def _post_pm_to_irc(self, irc_recipient: str, user_bot: UserBot) -> None: for line in self.raw_message['text'].splitlines(): user_bot.post_to_irc( user_bot.msg, irc_recipient, line, )
def _post_to_irc(self, channel_name: str, user_bot: UserBot) -> None: for line in self.raw_message['text'].splitlines(): user_bot.post_to_irc( user_bot.msg, '#' + channel_name, line, )
def _irc_me_action( self, channel_name: str, user_bot: UserBot, action: str, ) -> None: user_bot.post_to_irc( user_bot.describe, '#' + channel_name, action, )
def buildProtocol(self, addr): p = UserBot( self.slack_user['name'], self.slack_user['real_name'], self.slack_user['id'], self.channels, self.target_group_nick, self.nickserv_password, ) p.factory = self self.bridge_bot_factory.add_user_bot(p) self.resetDelay() return p
def _post_pm_to_irc(self, irc_recipient: str, user_bot: UserBot) -> None: user_bot.post_to_irc( user_bot.msg, irc_recipient, self.raw_message['text'], )
def _post_to_irc(self, channel_name: str, user_bot: UserBot) -> None: user_bot.post_to_irc( user_bot.msg, '#' + channel_name, self.raw_message['text'], )
def _change_presence(self, user_bot: UserBot) -> None: if self.raw_message['presence'] == 'away': user_bot.away('Slack user inactive.') elif self.raw_message['presence'] == 'active': user_bot.back()