From 82ef99b837c9b476e3cc6a7e34a1da16130cdce5 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Tue, 18 Aug 2015 12:42:51 +0200 Subject: [PATCH] Fix !join telling you to !swap if you're already joined --- src/wolfgame.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index 7408cdc..abd5665 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -1079,16 +1079,6 @@ def join_player(cli, player, chan, who = None, forced = False): "s" if stasis != 1 else "")) return - if acc is not None and not botconfig.DEBUG_MODE: - for user in pl: - if var.USERS[user]["account"] == acc: - msg = "Sorry, but \u0002{0}\u0002 is already joined under {1} account.{2}" - if who == player: - cli.notice(who, msg.format(user, "your", " Please use '{0}swap' to join instead.".format(botconfig.CMD_CHAR))) - else: - cli.notice(who, msg.format(user, "their", "")) - return - cmodes = [("+v", player)] if var.PHASE == "none": @@ -1132,6 +1122,15 @@ def join_player(cli, player, chan, who = None, forced = False): cli.notice(who, "Sorry, but the game is already running. Try again next time.") return else: + if acc is not None and not botconfig.DEBUG_MODE: + for user in pl: + if var.USERS[user]["account"] == acc: + msg = "Sorry, but \u0002{0}\u0002 is already joined under {1} account.{2}" + if who == player: + cli.notice(who, msg.format(user, "your", " Please use '{0}swap' to join instead.".format(botconfig.CMD_CHAR))) + else: + cli.notice(who, msg.format(user, "their", "")) + return var.ROLES["person"].append(player) if not is_fake_nick(player) or not botconfig.DEBUG_MODE: