diff options
| author | 2019-06-19 21:24:56 +0100 | |
|---|---|---|
| committer | 2019-06-19 21:24:56 +0100 | |
| commit | 3ae32db26e473448a5facfc5f689d50bb5f6cfb7 (patch) | |
| tree | caed24efa4fd043baf7449e1b8d704bed2aec342 /modules/vote.py | |
| parent | Manually strf birthdays so years are not .strip("0")ed (diff) | |
| signature | ||
Don't let people vote in closed votes
Diffstat (limited to 'modules/vote.py')
| -rw-r--r-- | modules/vote.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/vote.py b/modules/vote.py index 3f2e1c03..a1beb522 100644 --- a/modules/vote.py +++ b/modules/vote.py @@ -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" % |
