mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Changed privmsgs.CapabilityChecker to privmsgs.CapabilityCheckingPrivmsg
This commit is contained in:
parent
2404efa59c
commit
d1a5457080
@ -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> ...]
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user