From c64526b2489337ba6714f7577374b9f343b17958 Mon Sep 17 00:00:00 2001 From: Fudster Date: Wed, 22 Feb 2017 12:34:46 -0500 Subject: [PATCH] Fix message about invalid game mode when joining (#288) Using `!join` followed by something should not result in an error message. If a gamemode can be voted for, do it, otherwise silently do nothing. --- src/wolfgame.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index 2fd008d..62e1874 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -6846,10 +6846,12 @@ def vote_gamemode(var, wrapper, gamemode, doreply): if gamemode not in var.GAME_MODES.keys(): matches = complete_match(gamemode, var.GAME_MODES.keys() - {"roles", "villagergame"} - var.DISABLED_GAMEMODES) if not matches: - wrapper.pm(messages["invalid_mode"].format(gamemode)) + if doreply: + wrapper.pm(messages["invalid_mode"].format(gamemode)) return if len(matches) > 1: - wrapper.pm(messages["ambiguous_mode"].format(gamemode, ", ".join(matches))) + if doreply: + wrapper.pm(messages["ambiguous_mode"].format(gamemode, ", ".join(matches))) return if len(matches) == 1: gamemode = matches[0]