Don't let people vote in closed votes
This commit is contained in:
parent
9407e083bd
commit
3ae32db26e
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,10 @@ class Module(ModuleManager.BaseModule):
|
|||
event["stdout"].write("Vote %s%s: %s" % (
|
||||
vote_id, closed, self._format_vote(vote)))
|
||||
else:
|
||||
if not vote["open"]:
|
||||
raise utils.EventError("%s: vote %s is closed" % (
|
||||
event["user"].nickname, vote_id))
|
||||
|
||||
choice = event["args_split"][1].lower()
|
||||
if not choice in vote["options"]:
|
||||
raise utils.EventError("Vote options: %s" %
|
||||
|
|
Loading…
Reference in a new issue