def __init__(self, configdata, username='******', realname='realname', password=None): MessageChannel.__init__(self) self.give_up = True self.serverport = (configdata['host'], configdata['port']) #default hostid for use with miniircd which doesnt send NETWORK self.hostid = configdata['host'] + str(configdata['port']) self.socks5 = configdata["socks5"] self.usessl = configdata["usessl"] self.socks5_host = configdata["socks5_host"] self.socks5_port = int(configdata["socks5_port"]) self.channel = get_config_irc_channel(configdata["channel"]) self.userrealname = (username, realname) if password and len(password) == 0: password = None self.given_password = password self.pingQ = Queue.Queue() self.throttleQ = Queue.Queue() self.obQ = Queue.Queue()
def __init__(self, given_nick, username='******', realname='realname', password=None): MessageChannel.__init__(self) self.give_up = True self.cjpeer = None # subclasses have to set this to self self.given_nick = given_nick self.nick = given_nick config = jm_single().config self.serverport = (config.get("MESSAGING", "host"), int(config.get("MESSAGING", "port"))) self.socks5_host = config.get("MESSAGING", "socks5_host") self.socks5_port = int(config.get("MESSAGING", "socks5_port")) self.channel = get_config_irc_channel() self.userrealname = (username, realname) self.reconnect_delay = 30 self.newnyms = False try: self.reconnect_delay = int( config.get("MESSAGING", "reconnect_delay")) self.newnyms = (config.get("MESSAGING", "newnym").lower() == 'true') self.tor_host = config.get("MESSAGING", "tor_host") self.tor_port = int(config.get("MESSAGING", "tor_port")) self.tor_pass = config.get("MESSAGING", "tor_pass") self.newnym_delay = int(config.get("MESSAGING", "newnym_delay")) except NoOptionError as ex: log.debug('The following newnym option is missing:') log.debug(ex) log.debug('.. disabling the feature.') self.newnyms = False if password and len(password) == 0: password = None self.given_password = password self.pingQ = Queue.Queue() self.throttleQ = Queue.Queue() self.obQ = Queue.Queue()
def __init__(self, given_nick, username='******', realname='realname', password=None): MessageChannel.__init__(self) self.give_up = True self.cjpeer = None # subclasses have to set this to self self.given_nick = given_nick self.nick = given_nick config = jm_single().config self.serverport = (config.get("MESSAGING", "host"), int(config.get("MESSAGING", "port"))) self.socks5_host = config.get("MESSAGING", "socks5_host") self.socks5_port = int(config.get("MESSAGING", "socks5_port")) self.channel = get_config_irc_channel() self.userrealname = (username, realname) if password and len(password) == 0: password = None self.given_password = password self.pingQ = Queue.Queue() self.throttleQ = Queue.Queue() self.obQ = Queue.Queue()
def __init__(self, given_nick, username='******', realname='realname', password=None): MessageChannel.__init__(self) self.give_up = True self.cjpeer = None # subclasses have to set this to self self.given_nick = given_nick self.nick = given_nick config = jm_single().config self.serverport = (config.get("MESSAGING", "host"), int(config.get("MESSAGING", "port"))) self.socks5_host = config.get("MESSAGING", "socks5_host") self.socks5_port = int(config.get("MESSAGING", "socks5_port")) self.channel = get_config_irc_channel() self.userrealname = (username, realname) self.reconnect_delay = 30 self.newnyms = False try: self.reconnect_delay = int(config.get("MESSAGING", "reconnect_delay")) self.newnyms = (config.get("MESSAGING", "newnym").lower() == 'true') self.tor_host = config.get("MESSAGING", "tor_host") self.tor_port = int(config.get("MESSAGING", "tor_port")) self.tor_pass = config.get("MESSAGING", "tor_pass") self.newnym_delay = int(config.get("MESSAGING", "newnym_delay")) except NoOptionError as ex: log.debug('The following newnym option is missing:') log.debug(ex) log.debug('.. disabling the feature.') self.newnyms = False if password and len(password) == 0: password = None self.given_password = password self.pingQ = Queue.Queue() self.throttleQ = Queue.Queue() self.obQ = Queue.Queue()