From: Eric S. Raymond Date: Sat, 1 Sep 2012 12:37:37 +0000 (-0400) Subject: Shorten the nick negotiation when multiple instances are active. X-Git-Tag: 1.0~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=43be7a2f0a6899210f70389665d9802652b02ae8;p=irker.git Shorten the nick negotiation when multiple instances are active. --- diff --git a/irker b/irker index 2d24958..01d0585 100755 --- a/irker +++ b/irker @@ -74,13 +74,13 @@ version = "1.0" # . class Connection: - def __init__(self, irkerd, servername, port): + def __init__(self, irkerd, servername, port, nick_base=1): self.irker = irkerd self.servername = servername self.port = port + self.nick_trial = nick_base self.connection = None self.status = "unseen" - self.nick_trial = 1 self.last_xmit = time.time() self.last_ping = time.time() self.channels_joined = [] @@ -214,7 +214,8 @@ class Dispatcher: if not eligibles: newconn = Connection(self.irker, self.servername, - self.port) + self.port, + len(self.connections)+1) self.connections.append(newconn) eligibles = [newconn] eligibles[0].enqueue(channel, message)