From 936d7ebfea7dcc939a0517b114c7182feee8b5d4 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 19 Jun 2021 16:48:40 +0200 Subject: [PATCH] Poll Disallow 0 as poll id. --- plugins/Poll/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Poll/plugin.py b/plugins/Poll/plugin.py index 27a940cbb..378efab4d 100644 --- a/plugins/Poll/plugin.py +++ b/plugins/Poll/plugin.py @@ -117,7 +117,7 @@ class Poll_(callbacks.Plugin): irc.replySuccess(_("Poll # %d created.") % poll_id) - @wrap(["channel", "nonNegativeInt"]) + @wrap(["channel", "positiveInt"]) def close(self, irc, msg, args, channel, poll_id): """[] @@ -138,7 +138,7 @@ class Poll_(callbacks.Plugin): self._polls[(irc.network, channel)][poll_id] = poll irc.replySuccess() - @wrap(["channel", "nonNegativeInt", "somethingWithoutSpaces"]) + @wrap(["channel", "positiveInt", "somethingWithoutSpaces"]) def vote(self, irc, msg, args, channel, poll_id, answer_id): """[] @@ -167,7 +167,7 @@ class Poll_(callbacks.Plugin): irc.replySuccess() - @wrap(["channel", "nonNegativeInt"]) + @wrap(["channel", "positiveInt"]) def results(self, irc, msg, args, channel, poll_id): """[]