mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
Handle QUIT (quits all channels)
Also fix part log wording
This commit is contained in:
parent
b0871e2f9a
commit
244b11db7d
1 changed files with 13 additions and 2 deletions
15
tipbot.py
15
tipbot.py
|
@ -954,13 +954,24 @@ while True:
|
|||
|
||||
elif action == 'PART':
|
||||
nick = GetNick(who)
|
||||
log_info('%s joined the channel' % nick)
|
||||
log_info('%s left the channel' % nick)
|
||||
if not nick in userstable[chan]:
|
||||
log_warn('%s parted, but was not in %s' % (nick, chan))
|
||||
log_warn('%s left, but was not in %s' % (nick, chan))
|
||||
else:
|
||||
userstable[chan].remove(nick)
|
||||
log_log("New list of users in %s: %s" % (chan, str(userstable[chan])))
|
||||
|
||||
elif action == 'QUIT':
|
||||
nick = GetNick(who)
|
||||
log_info('%s quit' % nick)
|
||||
removed_list = ""
|
||||
for chan in userstable:
|
||||
log_log("Checking in %s" % chan)
|
||||
if nick in userstable[chan]:
|
||||
removed_list = removed_list + " " + chan
|
||||
userstable[chan].remove(nick)
|
||||
log_log("New list of users in %s: %s" % (chan, str(userstable[chan])))
|
||||
|
||||
elif action == 'NICK':
|
||||
nick = GetNick(who)
|
||||
new_nick = text
|
||||
|
|
Loading…
Reference in a new issue