summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-09-18 10:40:01 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-09-18 10:40:01 +0200
commit47f1fc09c64be6183c515ea27cda0c27073bc851 (patch)
treea5c6d28db606210a3a91a5d749c01756a0acd9c3 /miniircd
parentc712f6c0e1104f7813cacdb64c3449cad73d8eaf (diff)
downloadminiircd-47f1fc09c64be6183c515ea27cda0c27073bc851.tar.gz
miniircd-47f1fc09c64be6183c515ea27cda0c27073bc851.zip
Revert "Proper python3 support."
This reverts commit f2b077be8058ae19b8018ba2b844a8b902e1e37c since it breaks Python 2 compatibility.
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd10
1 files changed, 5 insertions, 5 deletions
diff --git a/miniircd b/miniircd
index 558d0d2..bf4d443 100755
--- a/miniircd
+++ b/miniircd
@@ -163,8 +163,8 @@ class Client(object):
if len(x[1]) > 0 and x[1][0] == ":":
arguments = [x[1][1:]]
else:
- y = x[1].split(" :", 1)
- arguments = y[0].split()
+ y = string.split(x[1], " :", 1)
+ arguments = string.split(y[0])
if len(y) == 2:
arguments.append(y[1])
self.__handle_command(command, arguments)
@@ -547,7 +547,7 @@ class Client(object):
data = ""
quitmsg = x
if data:
- self.__readbuffer += data.decode()
+ self.__readbuffer += data
self.__parse_read_buffer()
self.__timestamp = time.time()
self.__sent_ping = False
@@ -556,7 +556,7 @@ class Client(object):
def socket_writable_notification(self):
try:
- sent = self.socket.send(self.__writebuffer.encode())
+ sent = self.socket.send(self.__writebuffer)
self.server.print_debug(
"[%s:%d] <- %r" % (
self.host, self.port, self.__writebuffer[:sent]))
@@ -875,7 +875,7 @@ _ircstring_translation = _maketrans(
def irc_lower(s):
- return s.translate(_ircstring_translation)
+ return string.translate(s, _ircstring_translation)
def main(argv):