From: zonidjan Date: Mon, 14 Dec 2015 13:58:03 +0000 (-0600) Subject: add nick change tracking X-Git-Url: https://jfr.im/git/erebus.git/commitdiff_plain/061081bc194645190b57616ad56fe50105309820?hp=f8cc01248bbc0923ae8b52dfb259bb98a23eb01a add nick change tracking --- diff --git a/bot.py b/bot.py index e5bcebe..5f9f26f 100644 --- a/bot.py +++ b/bot.py @@ -91,6 +91,13 @@ class Bot(object): self.parent.user(nick).quit() del self.parent.users[nick.lower()] + elif pieces[1] == "NICK": + oldnick = pieces[0].split('!')[0][1:] + newnick = pieces[2][1:] + self.parent.users[newnick.lower()] = self.parent.users[oldnick.lower()] + del self.parent.users[oldnick.lower()] + self.parent.user(newnick).nick(newnick) + elif pieces[1] == "MODE": #TODO parse for ops/voices (at least) pass