def __init__(self): self.commands = {} self.settings = {} self.usersettings = {} proxy_svc.client_command_received_event.add_listener(self._client_privmsg_handler, Event.Handler, filter=match_command('PRIVMSG')) proxy_svc.client_command_received_event.add_listener(self._client_sbnc_handler, Event.Handler, filter=match_command('SBNC')) self.register_command('help', self._cmd_help_handler, 'User', 'displays a list of commands or information about individual commands', 'Syntax: help [command]\nDisplays a list of commands or information about individual commands.')
def __init__(self): proxy_svc.irc_command_received_event.add_listener(self._irc_privmsg_handler, Event.PostObserver, filter=match_command('PRIVMSG')) # register a client login handler so we can notify users about new messages proxy_svc.client_registration_event.add_listener(self._client_registration_event, Event.PostObserver) # and finally some handlers for /sbnc commands ui_svc.register_command('read', self._cmd_read_handler, 'User', 'plays your message log', 'Syntax: read\nDisplays your private log.') ui_svc.register_command('erase', self._cmd_erase_handler, 'User', 'erases your message log', 'Syntax: erase\nErases your private log.')