mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Filter: Fix encoding with Python 3.
This commit is contained in:
parent
7e0d868db1
commit
418b3e007c
@ -29,6 +29,7 @@
|
||||
###
|
||||
|
||||
import re
|
||||
import sys
|
||||
import codecs
|
||||
import string
|
||||
import random
|
||||
@ -209,7 +210,9 @@ class Filter(callbacks.Plugin):
|
||||
commonly used for text that simply needs to be hidden from inadvertent
|
||||
reading by roaming eyes, since it's easily reversible.
|
||||
"""
|
||||
irc.reply(self._rot13_encoder(text.decode('utf8'))[0])
|
||||
if sys.version_info[0] < 3:
|
||||
text = text.decode('utf8')
|
||||
irc.reply(self._rot13_encoder(text)[0])
|
||||
rot13 = wrap(rot13, ['text'])
|
||||
|
||||
@internationalizeDocstring
|
||||
|
Loading…
Reference in New Issue
Block a user