Check for actual guest nicks rather than anything starting with "Guest"

This commit is contained in:
nyuszika7h 2016-08-27 17:11:17 +02:00
parent 2dd19f3277
commit 1082736d2e

View File

@ -3595,7 +3595,7 @@ def on_nick(cli, oldnick, nick):
prefix, _, ident, host = parse_nick(oldnick)
chan = botconfig.CHANNEL
if (nick.startswith("Guest") or nick[0].isdigit() or (nick != "away" and "away" in nick.lower())) and nick not in var.DISCONNECTED.keys() and prefix in list_players():
if (re.search(r"^Guest\d+$", nick) or nick[0].isdigit() or (nick != "away" and "away" in nick.lower())) and nick not in var.DISCONNECTED.keys() and prefix in list_players():
if var.PHASE != "join":
cli.mode(chan, "-v", nick)
leave(cli, "badnick", oldnick)