Ignore leave-events from ppl not in the game.

Since leave-event was hooked up into ppl quiting and parting from the
channel as well as doing !leave, the message telling ppl were not in the
game would get triggered unintentionally.
This commit is contained in:
Juhani Krekelä 2019-05-14 22:00:06 +03:00
parent b38912b41d
commit 396b3c0185
1 changed files with 2 additions and 1 deletions

View File

@ -293,7 +293,8 @@ def game(send, notice, voice, devoice, get_event):
elif event == events.leave:
nick, = args
if nick not in players:
send('No such player %s' % nick)
# Ignore those not in the game
pass
elif errwrapper('Could not remove player %s (%%s)' % nick, remove_player, nick) is not Error:
devoice(nick)