mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-04 17:09:24 +01:00
removed privmsgs.channel.
This commit is contained in:
parent
f6461699f6
commit
c809b7a14e
@ -135,15 +135,6 @@ def checkChannelCapability(f, capability):
|
|||||||
irc.errorNoCapability(chancap)
|
irc.errorNoCapability(chancap)
|
||||||
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
||||||
|
|
||||||
def channel(f):
|
|
||||||
"""Gives the command an extra channel arg as if it had called getChannel"""
|
|
||||||
def newf(self, irc, msg, args, *L, **kwargs):
|
|
||||||
channel = getChannel(msg, args)
|
|
||||||
L = (channel,) + L
|
|
||||||
ff = types.MethodType(f, self, self.__class__)
|
|
||||||
ff(irc, msg, args, *L, **kwargs)
|
|
||||||
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
|
||||||
|
|
||||||
class CapabilityCheckingPrivmsg(callbacks.Privmsg):
|
class CapabilityCheckingPrivmsg(callbacks.Privmsg):
|
||||||
"""A small subclass of callbacks.Privmsg that checks self.capability
|
"""A small subclass of callbacks.Privmsg that checks self.capability
|
||||||
before allowing any command to be called.
|
before allowing any command to be called.
|
||||||
|
Loading…
Reference in New Issue
Block a user