Removed privmsgs.thread.

This commit is contained in:
Jeremy Fincher 2004-10-26 23:01:06 +00:00
parent 0a71b92584
commit a07f83ea9e

View File

@ -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):