diff --git a/irc/dline.go b/irc/dline.go index e0cb4744..c723c204 100644 --- a/irc/dline.go +++ b/irc/dline.go @@ -158,6 +158,7 @@ func (dm *DLineManager) addNetworkInternal(network net.IPNet, info IPBanInfo) (i if ok && netBan.Info.TimeCreated.Equal(timeCreated) { delete(dm.networks, id) // TODO(slingamn) here's where we'd remove it from the radix tree + delete(dm.expirationTimers, id) } } dm.expirationTimers[id] = time.AfterFunc(timeLeft, processExpiration) diff --git a/irc/kline.go b/irc/kline.go index fa4a2222..29ee7b79 100644 --- a/irc/kline.go +++ b/irc/kline.go @@ -113,6 +113,7 @@ func (km *KLineManager) addMaskInternal(mask string, info IPBanInfo) { maskBan, ok := km.entries[mask] if ok && maskBan.Info.TimeCreated.Equal(timeCreated) { delete(km.entries, mask) + delete(km.expirationTimers, mask) } } km.expirationTimers[mask] = time.AfterFunc(timeLeft, processExpiration)