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: