diff options
| author | LemonBoy <thatlemon@gmail.com> | 2016-09-14 20:50:32 +0200 | 
|---|---|---|
| committer | Joel Rosdahl <joel@rosdahl.net> | 2016-09-14 21:30:21 +0200 | 
| commit | f2b077be8058ae19b8018ba2b844a8b902e1e37c (patch) | |
| tree | c2d5d6ddafc01eca861e42647b21eac7f3d86950 | |
| parent | 2295b37f1bf6a16740a65e4753f95924a76b9bce (diff) | |
| download | miniircd-f2b077be8058ae19b8018ba2b844a8b902e1e37c.tar.gz miniircd-f2b077be8058ae19b8018ba2b844a8b902e1e37c.zip  | |
Proper python3 support.
| -rwxr-xr-x | miniircd | 10 | 
1 files changed, 5 insertions, 5 deletions
@@ -163,8 +163,8 @@ class Client(object):                  if len(x[1]) > 0 and x[1][0] == ":":                      arguments = [x[1][1:]]                  else: -                    y = string.split(x[1], " :", 1) -                    arguments = string.split(y[0]) +                    y = x[1].split(" :", 1) +                    arguments = y[0].split()                      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 +            self.__readbuffer += data.decode()              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) +            sent = self.socket.send(self.__writebuffer.encode())              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 string.translate(s, _ircstring_translation) +    return s.translate(_ircstring_translation)  def main(argv):  | 
