Fixed a bug where channel modes would crash the bot and cleaned up excess whitespace

This commit is contained in:
Chris Oliver 2011-09-23 17:11:42 -05:00
parent 97a20675ca
commit 0460e401b7

View file

@ -282,7 +282,7 @@ class Logbot(SingleServerIRCBot):
def on_mode(self, c, e):
self.write_event("mode", e,
{"%modes%" : e.arguments()[0],
"%person%" : e.arguments()[1],
"%person%" : e.arguments()[1] if len(e.arguments()) > 1 else "",
"%giver%" : nm_to_n(e.source()),
})