Make Bantracker.doUnban should work if a ban ID is passed even when Bantracker is not enabled in that channel (any more).

This commit is contained in:
tsimpson 2014-04-15 08:27:25 +01:00
parent 7dc11621d8
commit 9a29db902a

View File

@ -1056,7 +1056,7 @@ class Bantracker(callbacks.Plugin):
return ban
def doUnban(self, irc, channel, nick, mask, id = None):
if not self.registryValue('enabled', channel):
if id is None and not self.registryValue('enabled', channel):
return
if id is None:
data = self.db_run("SELECT MAX(id) FROM bans where channel=%s and mask=%s", (channel, mask), expect_result=True)