deal with properly killing NEW locks master
authorMark Hymers <mhy@debian.org>
Sat, 18 Apr 2009 22:21:15 +0000 (22:21 +0000)
committerMark Hymers <mhy@debian.org>
Sat, 18 Apr 2009 22:21:15 +0000 (22:21 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
Dak/plugin.py

index 840c2b9..4bd6fed 100644 (file)
@@ -247,6 +247,8 @@ class Dak(callbacks.Plugin):
             if what == "NEW":
                 if msg.nick in self.locks[what]:
                     self.locks[what].remove(msg.nick)
+                    if len(self.locks[what]) == 0:
+                        del(self.locks[what])
                     irc.reply("unlocked %s" % (what))
             elif self.locks[what] == msg.nick:
                 del(self.locks[what])