mirror of https://git.keinpfusch.net/loweel/zabov
- stats: if "SET" to zero, stat is removed
This commit is contained in:
parent
945709f24e
commit
15ec9f49ac
|
@ -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…
Reference in New Issue