Пример #1
0
    def execute(self, response):
        """
        @type response: IRCResponse
        """
        limit = 700  # chars
        expire = 10  # minutes
        if len(response.Response) > limit:
            replaced = WebUtils.pasteEE(
                StringUtils.stripFormatting(response.Response),
                u'Response longer than {0} chars intended for {1}'.format(
                    limit, response.Target), expire)

            response.Response = u'Response too long, pasted here instead: {0} (Expires in {1} minutes)'.format(
                replaced, expire)
        return response
Пример #2
0
    def execute(self, response):
        """
        @type response: IRCResponse
        """
        limit = 700  # chars
        expire = 10  # minutes
        if len(response.Response) > limit:
            replaced = WebUtils.pasteEE(StringUtils.stripFormatting(response.Response),
                                        u'Response longer than {0} chars intended for {1}'.format(limit,
                                                                                                  response.Target),
                                        expire)

            response.Response = u'Response too long, pasted here instead: {0} (Expires in {1} minutes)'.format(replaced,
                                                                                                               expire)
        return response
Пример #3
0
 def execute(self, response):
     """
     @type response: IRCResponse
     """
     response.Response = StringUtils.stripFormatting(response.Response)
     return response
Пример #4
0
 def execute(self, response):
     """
     @type response: IRCResponse
     """
     response.Response = StringUtils.stripFormatting(response.Response)
     return response