From db519a682778a930c722a8f26645e54d358e6a9f Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Fri, 22 Jul 2016 10:36:44 +0200 Subject: [PATCH] Notice players instead of silence when already voted game mode This accidentally ended up partially being in an earlier commit, but now here it is... --- messages/en.json | 1 + src/wolfgame.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/messages/en.json b/messages/en.json index 6822434..146392b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -132,6 +132,7 @@ "set_pingif": "Your ping preferences have been set to {0}.", "pingif_invalid": "Invalid parameter. Please enter a non-negative integer or a valid preference.", "ping_player": "PING! {0} player{1}! ", + "already_voted_game": "You have already voted for the {0} game mode.", "vote_game_mode": "\u0002{0}\u0002 votes for the \u0002{1}\u0002 game mode.", "bot_not_opped": "Sorry, I'm not opped in {0}.", "already_playing": "{0}'re already playing!", diff --git a/src/wolfgame.py b/src/wolfgame.py index 182024f..d7c0728 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -9357,7 +9357,9 @@ def vote_gamemode(cli, nick, chan, gamemode, doreply): gamemode = match if gamemode != "roles" and gamemode != "villagergame": - if var.GAMEMODE_VOTES.get(nick) != gamemode: + if var.GAMEMODE_VOTES.get(nick) == gamemode: + cli.notice(nick, messages["already_voted_game"].format(gamemode)) + else: var.GAMEMODE_VOTES[nick] = gamemode cli.msg(chan, messages["vote_game_mode"].format(nick, gamemode)) else: