mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Removed privmsgs.thread.
This commit is contained in:
parent
0a71b92584
commit
a07f83ea9e
@ -135,18 +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 thread(f):
|
|
||||||
"""Makes sure a command spawns a thread when called."""
|
|
||||||
def newf(self, irc, msg, args, *L, **kwargs):
|
|
||||||
if threading.currentThread() is world.mainThread:
|
|
||||||
t = callbacks.CommandThread(target=irc._callCommand,
|
|
||||||
args=(f.func_name, self),
|
|
||||||
kwargs=kwargs)
|
|
||||||
t.start()
|
|
||||||
else:
|
|
||||||
f(self, irc, msg, args, *L, **kwargs)
|
|
||||||
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
|
||||||
|
|
||||||
def channel(f):
|
def channel(f):
|
||||||
"""Gives the command an extra channel arg as if it had called getChannel"""
|
"""Gives the command an extra channel arg as if it had called getChannel"""
|
||||||
def newf(self, irc, msg, args, *L, **kwargs):
|
def newf(self, irc, msg, args, *L, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user