Ejemplo n.º 1
0
    def setup_handler(evt, var, target):
        from src import lagcheck
        if lagcheck: # we just got our own host back
            target.client.command_handler["privmsg"] = on_privmsg
            run_lagcheck(target.client)
        else:
            target.client.command_handler["privmsg"] = on_privmsg
            target.client.command_handler["notice"] = functools.partial(on_privmsg, notice=True)

        events.remove_listener("who_end", setup_handler)
Ejemplo n.º 2
0
    def setup_handler(evt, var, target):
        from src import lagcheck
        if lagcheck:  # we just got our own host back
            target.client.command_handler["privmsg"] = on_privmsg
            run_lagcheck(target.client)
        else:
            target.client.command_handler["privmsg"] = on_privmsg
            target.client.command_handler["notice"] = functools.partial(
                on_privmsg, notice=True)

        events.remove_listener("who_end", setup_handler)
Ejemplo n.º 3
0
    def setup_handler(evt, var, target):
        target.client.command_handler["privmsg"] = on_privmsg
        target.client.command_handler["notice"] = functools.partial(
            on_privmsg, notice=True)

        events.remove_listener("who_end", setup_handler)
Ejemplo n.º 4
0
 def remove(self):
     events.remove_listener(self.event, self.func, self.priority)
Ejemplo n.º 5
0
 def teardown(self):
     events.remove_listener("chk_win", self.chk_win, 1)
Ejemplo n.º 6
0
 def teardown(self):
     events.remove_listener("role_attribution", self.role_attribution, 1)