make banlist consistent, fixes #54
This commit is contained in:
@@ -119,12 +119,14 @@ func (b *Bot) IsTrusted(addr net.Addr) bool {
|
||||
}
|
||||
}
|
||||
|
||||
b.log.Debug("address %s is NOT trusted", ip)
|
||||
return false
|
||||
}
|
||||
|
||||
// Ban an address
|
||||
func (b *Bot) Ban(addr net.Addr) {
|
||||
if !b.cfg.BanlistEnalbed() {
|
||||
return
|
||||
}
|
||||
if b.IsTrusted(addr) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user