All pastes #741900 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-19 01:56 UTC
rendered paste body
class Benzo(ircbot.SingleServerIRCBot):
    def __init__(self):
        self.version = VERSION
        self.config = Config
        # this is hackish - find away for events to expose this themselves
        self.nm_to_n = nm_to_n
        self.nm_to_uh = nm_to_uh
        ircbot.SingleServerIRCBot.__init__(self, self.config.SERVER_LIST,
                                         self.config.NICKNAME,
                                         self.config.REALNAME)

        self.event_dict = {}    # dict of event->(priority, handler)
        self.modules = {}       # dict of handler modules
        self.interfaces = {}    # dict of module-provided interfaces
        self.init_modules()
        self.connection.add_global_handler("all_events",
                                           self.dispatcher, -10)