Skip to content

Commit

Permalink
Disallow to vote --- without specifying a reason
Browse files Browse the repository at this point in the history
  • Loading branch information
nsavch committed Mar 13, 2017
1 parent 8903682 commit 77dabb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xanmel/modules/xonotic/chat_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ async def run(self, user, message, is_private=True, root=None):
old_vote = rcon_server.map_voter.votes[user.number2]
if old_vote['vote'] == self.vote and old_vote['message'] == message:
await user.private_reply('You have already voted this round. Enough. You can change your vote though.')
if not message.strip() and self.vote == -3:
await user.private_reply('You can not vote --- without specifying a reason why you hate the map. Use '
'"/--- you-complaint-about-map" instead')
return
player = rcon_server.players.players_by_number2[user.number2]
rcon_server.map_voter.votes[user.number2] = {
'vote': self.vote,
Expand Down

0 comments on commit 77dabb9

Please sign in to comment.