pingif: Fix incorrect usage of 'any'

This commit is contained in:
nyuszika7h 2015-02-22 22:46:48 +01:00
parent 7761289893
commit 19760a0ea7

View File

@ -840,9 +840,9 @@ def altpinger(cli, nick, chan, rest):
else:
msg.append("You do not have any ping preferences currently set.")
elif any(rest[0] in ("off", "never"),
elif any((rest[0] in ("off", "never"),
rest[0].isdigit() and int(rest[0]) == 0,
len(rest) > 1 and rest[1].isdigit() and int(rest[1]) == 0):
len(rest) > 1 and rest[1].isdigit() and int(rest[1]) == 0)):
if altpinged:
msg.append("Your ping preferences have been removed (was {0}).".format(players))
toggle_altpinged_status(nick, 0, players)