def __init__(self, base, scheme=None): if scheme is None: scheme = COLOR_SCHEME Madcow.__init__(self, base, scheme=scheme) passphrase = settings.SILC_PASSPHRASE if not passphrase: passphrase = '' keys = silc.create_key_pair('silc.pub', 'silc.priv', passphrase=passphrase) nick = settings.BOTNAME silc.SilcClient.__init__(self, keys, nick, nick, nick) self.channels = settings.SILC_CHANNELS # throttling self.delay = settings.SILC_DELAY / float(1000) self.last_response = 0.0
def __init__(self, config=None, dir=None): Madcow.__init__(self, config=config, dir=dir) self.colorlib = ColorLib('mirc') if log.root.level <= log.DEBUG: irclib.DEBUG = 1 else: irclib.DEBUG = 0 self.irc = irclib.IRC() self.server = self.irc.server() for event in self.events: log.info('[IRC] * Registering event: %s' % event) self.server.add_global_handler( event, getattr(self, 'on_' + event), 0, ) if self.config.irc.channels is not None: self.channels = self._delim.split(self.config.irc.channels) else: self.channels = [] self.names = {} self.last_names_update = unix_time()
def __init__(self, config=None, dir=None): self.colorlib = ColorLib('ansi') Madcow.__init__(self, config=config, dir=dir) self.user_nick = os.environ['USER'] self.shell = Shell(polls=[self.check_response_queue]) self.usageLines += self._cli_usage
def __init__(self, config, dir): """Protocol-specific initializations""" Madcow.__init__(self, config, dir)