Browse Source

- stats: if "SET" to zero, stat is removed

master
bloved 1 month ago
parent
commit
15ec9f49ac
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      01.stats.go

+ 6
- 1
01.stats.go View File

@ -81,7 +81,12 @@ func statsThread() {
case "INC":
ZabovStats[item.Payload] += item.Number
case "SET":
ZabovStats[item.Payload] = item.Number
if item.Number == 0 {
delete(ZabovStats, item.Payload)
} else {
ZabovStats[item.Payload] = item.Number
}
case "PRI":
statsPrint()
}

Loading…
Cancel
Save