Changed privmsgs.CapabilityChecker to privmsgs.CapabilityCheckingPrivmsg

This commit is contained in:
Jeremy Fincher 2003-03-27 07:26:46 +00:00
parent 2404efa59c
commit d1a5457080
2 changed files with 3 additions and 4 deletions

View File

@ -41,7 +41,7 @@ import ircmsgs
import privmsgs
import callbacks
class AdminCommands(privmsgs.CapabilityChecker):
class AdminCommands(privmsgs.CapabilityCheckingPrivmsg):
capability = 'admin'
def join(self, irc, msg, args):
"""<channel> [<channel> ...]

View File

@ -105,7 +105,7 @@ def getKeywordArgs(irc, msg, d=None):
return (args, d)
class CapabilityChecker(callbacks.Privmsg):
class CapabilityCheckingPrivmsg(callbacks.Privmsg):
def callCommand(self, f, irc, msg, args):
if ircdb.checkCapability(msg.prefix, self.capability):
callbacks.Privmsg.callCommand(self, f, irc, msg, args)
@ -113,7 +113,7 @@ class CapabilityChecker(callbacks.Privmsg):
irc.error(msg, conf.replyNoCapability % self.capability)
class OwnerCommands(CapabilityChecker):
class OwnerCommands(CapabilityCheckingPrivmsg):
capability = 'owner'
def __init__(self):
callbacks.Privmsg.__init__(self)
@ -311,7 +311,6 @@ class OwnerCommands(CapabilityChecker):
irc.error(msg, 'There was no callback %s' % name)
standardPrivmsgModules = [OwnerCommands]
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: