Merge pull request #37 from aaparella/fast-name-change-fix

Fix for issue #12 : Update upon name change prior to being greeted
This commit is contained in:
shaunagm 2014-09-17 15:39:17 -04:00
commit 602b2f1176
2 changed files with 8 additions and 0 deletions

6
bot.py
View File

@ -131,6 +131,12 @@ def message_response(bot, ircmsg, actor, ircsock):
if actor.replace("_", "") not in bot.known_nicks and (i.nick for i in bot.newcomers): # And they're new
NewComer(actor, bot)
# if someone changes their nick while still in newcomers update that nick
if ircmsg.find("NICK :") != -1 and actor != botnick:
for i in bot.newcomers: # if that person was in the newlist
if i.nick == actor:
i.nick = ircmsg.split(":")[2] # update to new nick
# If someone parts or quits the #channel...
if ircmsg.find("PART " + channel) != -1 or ircmsg.find("QUIT") != -1:
for i in bot.newcomers: # and that person is on the newlist

View File

@ -71,3 +71,5 @@ gitcommits
sassyapril
MaraJade
achock
aaparella
abcqfiojqw

1 paulproteus
71 sassyapril
72 MaraJade
73 achock
74 aaparella
75 abcqfiojqw