def _create_bot(self, network): """ Create, register, and return a new bot for `network`. """ nickname = self.free_nick() bot = self._bot_class( self, Account.new(nickname=nickname, username=u"notifico", realname=u"Notifico! - http://n.tkte.ch/"), network) try: bot.connect() except Exception: logger.error('An issue occured while connecting to a host', exc_info=True, extra={ 'data': { 'host': network.host, 'port': network.port, 'ssl': network.ssl, 'password': network.password } }) return None self._active_bots[network._replace(ssl=False)].add(bot) return bot
def _create_bot(self, network): """ Create, register, and return a new bot for `network`. """ nickname = self.free_nick() bot = self._bot_class( self, Account.new( nickname=nickname, username=u"notifico", realname=u"Notifico! - http://n.tkte.ch/" ), network ) try: bot.connect() except Exception: logger.error( 'An issue occured while connecting to a host', exc_info=True, extra={ 'data': { 'host': network.host, 'port': network.port, 'ssl': network.ssl, 'password': network.password } } ) return None self._active_bots[network._replace(ssl=False)].add(bot) return bot
def _create_bot(self, network): """ Create, register, and return a new bot for `network`. """ nickname = self.free_nick() bot = self._bot_class( self, Account.new(nickname=nickname, username=u"notific", realname=u"Notifico! - http://n.tkte.ch/"), network ) bot.connect() self._active_bots[network._replace(ssl=False)].add(bot) return bot