Example #1
0
    def execute(self, response: IRCResponse):
        limit = 700  # chars
        expire = 10 * 60  # seconds
        if len(response.response) > limit:
            mh = self.bot.moduleHandler
            replaced = mh.runActionUntilValue(
                'upload-dbco', string.stripFormatting(response.response),
                expire)

            response.response = ('Response too long, pasted here instead: '
                                 '{} (Expires in {} minutes)'.format(
                                     replaced, expire // 60))
Example #2
0
 def execute(self, response: IRCResponse):
     if response.target in self.bot.channels:
         channel = self.bot.channels[response.target]
         if 'c' in channel.modes:
             # strip formatting if colours are blocked on the channel
             response.response = string.stripFormatting(response.response)
Example #3
0
 def execute(self, response: IRCResponse):
     if response.target in self.bot.channels:
         channel = self.bot.channels[response.target]
         if 'c' in channel.modes:
             # strip formatting if colours are blocked on the channel
             response.response = string.stripFormatting(response.response)