From dda9348fb2bc9f45dec392576824e33997e0b04e Mon Sep 17 00:00:00 2001 From: "Vgr E.Barry" Date: Sun, 15 Mar 2015 14:24:51 -0400 Subject: [PATCH] Only register votes on join if player was successfully joined --- modules/wolfgame.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index b15571a..3b4346f 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -1117,8 +1117,7 @@ def join(cli, nick, chan, rest): if nick in var.USERS and (not var.USERS[nick]["account"] or var.USERS[nick]["account"] == "*"): cli.notice(nick, "You are not logged in to NickServ.") return - join_player(cli, nick, chan) - if rest and not var.FGAMED: + if join_player(cli, nick, chan) and rest and not var.FGAMED: gamemode = rest.lower().split()[0] if gamemode not in var.GAME_MODES.keys(): match, _ = complete_match(gamemode, var.GAME_MODES.keys() - ["roles"]) @@ -1241,6 +1240,8 @@ def join_player(cli, player, chan, who = None, forced = False): t.daemon = True t.start() + return True + def kill_join(cli, chan): pl = var.list_players() pl.sort(key=lambda x: x.lower())