diff -r af912f53649c -r 24f0b13e87d3 rest.py --- a/rest.py Sat Nov 29 05:56:32 2014 +0200 +++ b/rest.py Fri Nov 28 23:24:06 2014 -0500 @@ -49,7 +49,7 @@ # not in list g_throttle.append ([address, tt]) - Irc.broadcast ('Throttling %s:%s for 30 seconds' % address) + Irc.broadcast ('Throttling %s for 30 seconds' % address) def handle_rest_http (data, address): global g_credentials @@ -75,7 +75,7 @@ payload = match.group (1) if not authenticated: - Irc.broadcast ('%s:%s failed to authenticate' % address) + Irc.broadcast ('%s failed to authenticate' % address) throttle (address) return @@ -112,12 +112,11 @@ address = None def __init__ (self, conn, address): - asyncore.dispatcher.__init__ (self, conn, address) + asyncore.dispatcher.__init__ (self, conn) self.socket = ssl.wrap_socket (conn, server_side=True, keyfile='key.pem', certfile='cert.pem', do_handshake_on_connect=False) - self.socket.setblocking (0) + self.socket.settimeout (3) self.address = address - print 'Initialized connection handler for %s' % type (address) while True: try: