mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-26 21:11:14 -05:00
CtcpNext: limit set and unset commands to admin
This commit is contained in:
parent
169c1873dc
commit
aa9e10db42
@ -119,7 +119,7 @@ class CtcpNext(callbacks.PluginRegexp):
|
|||||||
"""
|
"""
|
||||||
self.db[ctcp.upper()] = response
|
self.db[ctcp.upper()] = response
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
set = wrap(set, ['somethingWithoutSpaces', 'text'])
|
set = wrap(set, ['admin', 'somethingWithoutSpaces', 'text'])
|
||||||
|
|
||||||
def unset(self, irc, msg, args, ctcp):
|
def unset(self, irc, msg, args, ctcp):
|
||||||
"""<ctcp>
|
"""<ctcp>
|
||||||
@ -133,7 +133,7 @@ class CtcpNext(callbacks.PluginRegexp):
|
|||||||
irc.error("No such CTCP '%s' exists." % ctcp, Raise=True)
|
irc.error("No such CTCP '%s' exists." % ctcp, Raise=True)
|
||||||
else:
|
else:
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
unset = wrap(unset, ['somethingWithoutSpaces'])
|
unset = wrap(unset, ['admin', 'somethingWithoutSpaces'])
|
||||||
|
|
||||||
def list(self, irc, msg, args):
|
def list(self, irc, msg, args):
|
||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
|
@ -33,5 +33,4 @@ from supybot.test import *
|
|||||||
class RelayNextTestCase(PluginTestCase):
|
class RelayNextTestCase(PluginTestCase):
|
||||||
plugins = ('RelayNext',)
|
plugins = ('RelayNext',)
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user