~ubuntu-bots/ubuntu-bots/devel

« back to all changes in this revision

Viewing changes to Bantracker/plugin.py

  • Committer: tsimpson
  • Date: 2014-04-15 07:27:25 UTC
  • Revision ID: tsimpson@ubuntu.com-20140415072725-7c11l2okaqa4ptpx
Make Bantracker.doUnban should work if a ban ID is passed even when Bantracker is not enabled in that channel (any more).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
        return ban
1057
1057
 
1058
1058
    def doUnban(self, irc, channel, nick, mask, id = None):
1059
 
        if not self.registryValue('enabled', channel):
 
1059
        if id is None and not self.registryValue('enabled', channel):
1060
1060
            return
1061
1061
        if id is None:
1062
1062
            data = self.db_run("SELECT MAX(id) FROM bans where channel=%s and mask=%s", (channel, mask), expect_result=True)