fixed singlethread

This commit is contained in:
Luke Rogers 2013-11-10 13:36:02 +13:00
parent f49c1b873c
commit bae3c819ca
2 changed files with 1 additions and 2 deletions

View file

@ -90,7 +90,6 @@ class PluginLoader(object):
for obj in namespace.itervalues(): for obj in namespace.itervalues():
if hasattr(obj, '_hook'): # check for magic if hasattr(obj, '_hook'): # check for magic
if obj._thread: if obj._thread:
# TODO: pretty sure this is broken
self.bot.threads[obj] = main.Handler(self.bot, obj) self.bot.threads[obj] = main.Handler(self.bot, obj)
for type, data in obj._hook: for type, data in obj._hook:

View file

@ -94,7 +94,7 @@ def do_sieve(sieve, bot, input, func, type, args):
class Handler(object): class Handler(object):
"""Runs plugins in their own threads (ensures order)""" """Runs plugins in their own threads (ensures order)"""
def __init__(self, func, bot): def __init__(self, bot, func):
self.func = func self.func = func
self.bot = bot self.bot = bot
self.input_queue = Queue.Queue() self.input_queue = Queue.Queue()