mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Fixed binary command.
This commit is contained in:
parent
1a704ef1f7
commit
046c6998e4
@ -140,13 +140,21 @@ class FunCommands(callbacks.Privmsg):
|
||||
"""
|
||||
L = []
|
||||
for c in privmsgs.getArgs(args):
|
||||
LL = []
|
||||
i = ord(c)
|
||||
counter = 8
|
||||
while i:
|
||||
counter -= 1
|
||||
if i & 1:
|
||||
L.append('1')
|
||||
LL.append('1')
|
||||
else:
|
||||
L.append('0')
|
||||
LL.append('0')
|
||||
i >>= 1
|
||||
while counter:
|
||||
LL.append('0')
|
||||
counter -= 1
|
||||
LL.reverse()
|
||||
L.extend(LL)
|
||||
irc.reply(msg, ''.join(L))
|
||||
|
||||
def hexlify(self, irc, msg, args):
|
||||
|
Loading…
Reference in New Issue
Block a user