From 046c6998e4570a54ca8a60badb81a04879f66df6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 12 Jun 2003 16:05:27 +0000 Subject: [PATCH] Fixed binary command. --- plugins/FunCommands.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/FunCommands.py b/plugins/FunCommands.py index f3b2f9def..1ba9b5cf4 100644 --- a/plugins/FunCommands.py +++ b/plugins/FunCommands.py @@ -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):