Esempio n. 1
0
    def __init__(self, bot):
        self.bot = bot
        self.BNCS = self.bot.BNCS

        self.bot.events.add(self, 'BNCSRecv', -1, 0,
                            0x26, self.recv_0x26,
                            0x35, self.recv_0x35)

        self.bot.events.add(self, 'profile', 0, 0,
                            'request', self.request,
                            'write', self.write)

        self.requests = cookie_handler()
Esempio n. 2
0
    def __init__(self, bot):
        self.bot = bot
        self.invite = {}
        self.responses = cookie_handler()

        self.clanned = False
        self.creating = False
        
        
        self.bot.events.add(self, 'ui', 1, 0,
                            'reload', self.ui_reload)
        self.bot.events.add(self, 'bot', 1, 0,
                            'disc', self.disc,
                            'connected', self.get_clan)

        #self.bot.events.add(self, 'ui', 'list', 'clan', 0, 0,
        #                    'selected', self.get_clan)

        self.bot.events.add(self, 'BNCSRecv', -1, 0,
                            0x70, self.recv_cand,
                            0x71, self.recv_mult_invite,
                            0x73, self.recv_disband,
                            0x74, self.recv_chief,
                            0x75, self.recv_info,
                            0x76, self.recv_quit,
                            0x77, self.recv_invite,
                            0x78, self.recv_set_rank,
                            0x79, self.recv_invited,
                            0x7A, self.recv_set_rank,
                            0x7C, self.recv_motd,
                            0x7D, self.recv_clan,
                            0x7E, self.recv_removed,
                            0x7F, self.recv_status,
                            0x81, self.recv_rank_change,
                            0x82, self.recv_member_info)

        self.bot.events.add(self, 'commands', 0, 0,
                            'start', self.add_commands)

        self.add_commands()