mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 15:44:06 +01:00
Changed binascii.hexlify to encode('hex_codec').
This commit is contained in:
parent
c81c452306
commit
f4a057cf4b
@ -52,7 +52,6 @@ import string
|
|||||||
import random
|
import random
|
||||||
import urllib
|
import urllib
|
||||||
import inspect
|
import inspect
|
||||||
import binascii
|
|
||||||
import telnetlib
|
import telnetlib
|
||||||
import threading
|
import threading
|
||||||
import mimetypes
|
import mimetypes
|
||||||
@ -281,7 +280,7 @@ class FunCommands(callbacks.Privmsg):
|
|||||||
composed of the hexadecimal value of each character in the string
|
composed of the hexadecimal value of each character in the string
|
||||||
"""
|
"""
|
||||||
text = privmsgs.getArgs(args)
|
text = privmsgs.getArgs(args)
|
||||||
irc.reply(msg, binascii.hexlify(text))
|
irc.reply(msg, text.encode('hex_codec'))
|
||||||
|
|
||||||
def unhexlify(self, irc, msg, args):
|
def unhexlify(self, irc, msg, args):
|
||||||
"""<hexstring>
|
"""<hexstring>
|
||||||
@ -291,8 +290,7 @@ class FunCommands(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
text = privmsgs.getArgs(args)
|
text = privmsgs.getArgs(args)
|
||||||
try:
|
try:
|
||||||
s = binascii.unhexlify(text)
|
irc.reply(msg, text.decode('hex_codec'))
|
||||||
irc.reply(msg, s)
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
irc.error(msg, 'Invalid input.')
|
irc.error(msg, 'Invalid input.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user