Skip to content

Commit

Permalink
fixed duration regular expression in ban and quiet commands
Browse files Browse the repository at this point in the history
  • Loading branch information
brownan committed Sep 3, 2012
1 parent f623c65 commit 87307a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions abbott/plugins/admin.py
Expand Up @@ -128,7 +128,7 @@ def _has_op(self, channel):
defer.returnValue( self.have_op[channel] )
except KeyError:
# determine if we have OP
names_list = (yield self.transport.issue_request("irc.names",channel))
names_list = (yield self.transport.issue_request("irc.names",channel)).split()

nick = (yield self.transport.issue_request("irc.getnick"))

Expand Down Expand Up @@ -554,7 +554,7 @@ def start(self):
cmdname="quiet",
cmdmatch="quiet|QUIET",
cmdusage="<nick or hostmask> [for <duration>]",
argmatch = "(?P<nick>[^ ]+)(?: (?:for )?{0})?$".format(duration_match),
argmatch = "(?P<nick>[^ ]+)(?: (?:for )?{0}+)?$".format(duration_match),
prefix=".",
permission="irc.op.quiet",
callback=self.quiet,
Expand All @@ -565,7 +565,7 @@ def start(self):
cmdname="unquiet",
cmdmatch="unquiet|UNQUIET",
cmdusage="<nick or hostmask> [in <delay>]",
argmatch = "(?P<nick>[^ ]+)(?: (?:in )?{0})?$".format(duration_match),
argmatch = "(?P<nick>[^ ]+)(?: (?:in )?{0}+)?$".format(duration_match),
prefix=".",
permission="irc.op.quiet",
callback=self.unquiet,
Expand All @@ -577,7 +577,7 @@ def start(self):
cmdname="ban",
cmdmatch="ban|BAN",
cmdusage="<nick or hostmask> [for <duration>] [reason]",
argmatch = "(?P<nick>[^ ]+)(?: (?:for )?{0})?(?: (?P<reason>.+))?$".format(duration_match),
argmatch = "(?P<nick>[^ ]+)(?: (?:for )?{0}+)?(?: (?P<reason>.+))?$".format(duration_match),
prefix=".",
permission="irc.op.ban",
callback=self.ban,
Expand All @@ -588,7 +588,7 @@ def start(self):
cmdname="unban",
cmdmatch="unban|UNBAN",
cmdusage="<nick or hostmask> [in <delay>]",
argmatch = "(?P<nick>[^ ]+)(?: (?:in )?{0})?$".format(duration_match),
argmatch = "(?P<nick>[^ ]+)(?: (?:in )?{0}+)?$".format(duration_match),
prefix=".",
permission="irc.op.ban",
callback=self.unban,
Expand Down

0 comments on commit 87307a2

Please sign in to comment.