mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-17 15:13:02 +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 privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
class AdminCommands(privmsgs.CapabilityChecker):
|
class AdminCommands(privmsgs.CapabilityCheckingPrivmsg):
|
||||||
capability = 'admin'
|
capability = 'admin'
|
||||||
def join(self, irc, msg, args):
|
def join(self, irc, msg, args):
|
||||||
"""<channel> [<channel> ...]
|
"""<channel> [<channel> ...]
|
||||||
|
@ -105,7 +105,7 @@ def getKeywordArgs(irc, msg, d=None):
|
|||||||
return (args, d)
|
return (args, d)
|
||||||
|
|
||||||
|
|
||||||
class CapabilityChecker(callbacks.Privmsg):
|
class CapabilityCheckingPrivmsg(callbacks.Privmsg):
|
||||||
def callCommand(self, f, irc, msg, args):
|
def callCommand(self, f, irc, msg, args):
|
||||||
if ircdb.checkCapability(msg.prefix, self.capability):
|
if ircdb.checkCapability(msg.prefix, self.capability):
|
||||||
callbacks.Privmsg.callCommand(self, f, irc, msg, args)
|
callbacks.Privmsg.callCommand(self, f, irc, msg, args)
|
||||||
@ -113,7 +113,7 @@ class CapabilityChecker(callbacks.Privmsg):
|
|||||||
irc.error(msg, conf.replyNoCapability % self.capability)
|
irc.error(msg, conf.replyNoCapability % self.capability)
|
||||||
|
|
||||||
|
|
||||||
class OwnerCommands(CapabilityChecker):
|
class OwnerCommands(CapabilityCheckingPrivmsg):
|
||||||
capability = 'owner'
|
capability = 'owner'
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
@ -311,7 +311,6 @@ class OwnerCommands(CapabilityChecker):
|
|||||||
irc.error(msg, 'There was no callback %s' % name)
|
irc.error(msg, 'There was no callback %s' % name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
standardPrivmsgModules = [OwnerCommands]
|
standardPrivmsgModules = [OwnerCommands]
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user