CtcpNext: limit set and unset commands to admin

This commit is contained in:
James Lu 2015-01-04 16:34:29 -08:00
parent 169c1873dc
commit aa9e10db42
2 changed files with 2 additions and 3 deletions

View File

@ -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.

View File

@ -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: