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...
This commit is contained in:
nyuszika7h 2016-07-22 10:36:44 +02:00
parent b556e74fd8
commit db519a6827
2 changed files with 4 additions and 1 deletions

View File

@ -132,6 +132,7 @@
"set_pingif": "Your ping preferences have been set to {0}.", "set_pingif": "Your ping preferences have been set to {0}.",
"pingif_invalid": "Invalid parameter. Please enter a non-negative integer or a valid preference.", "pingif_invalid": "Invalid parameter. Please enter a non-negative integer or a valid preference.",
"ping_player": "PING! {0} player{1}! ", "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.", "vote_game_mode": "\u0002{0}\u0002 votes for the \u0002{1}\u0002 game mode.",
"bot_not_opped": "Sorry, I'm not opped in {0}.", "bot_not_opped": "Sorry, I'm not opped in {0}.",
"already_playing": "{0}'re already playing!", "already_playing": "{0}'re already playing!",

View File

@ -9357,7 +9357,9 @@ def vote_gamemode(cli, nick, chan, gamemode, doreply):
gamemode = match gamemode = match
if gamemode != "roles" and gamemode != "villagergame": 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 var.GAMEMODE_VOTES[nick] = gamemode
cli.msg(chan, messages["vote_game_mode"].format(nick, gamemode)) cli.msg(chan, messages["vote_game_mode"].format(nick, gamemode))
else: else: