Esempio n. 1
0
 def reencode(self, message, args):
     """ <strong>DEBUG:</strong> Reencodes <span class="irc"><span class="repl">phrase</span></span> from character set <span class="irc"><span class="repl">from</span></span> to <span class="irc"><span class="repl">to</span></span>. <span class="irc"><span class="repl">from</span></span> and <span class="irc"><span class="repl">to</span></span> must be any of the standard encodings listed <a href="http://docs.python.org/library/codecs.html#standard-encodings">here</a>."""
     output = ' '.join(message.content_raw.split(' ')[3:]).decode(args['from']).encode(args['to'])
     _rawsend.send(self.irc, message.source, output)
Esempio n. 2
0
 def longtext(self, message, args):
     """ <strong>DEBUG:</strong> Sends a long string of text in the character set <span class="irc"><span class="repl">to</span></span>. The text must be a string in _longtext.py decoded by Python's unicode() or string.decode() functions and the plugin will crash gracefully if <span class="irc"><span class="repl">to</span></span> cannot handle some or all of the characters. <span class="irc"><span class="repl">to</span></span> must be any of the standard encodings listed <a href="http://docs.python.org/library/codecs.html#standard-encodings">here</a>."""
     _rawsend.send(self.irc, message.source, _longtext.string.encode(args['to']))