From: Eric S. Raymond Date: Mon, 27 Aug 2012 00:20:29 +0000 (-0400) Subject: Refactor. X-Git-Tag: 1.0~105 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cec1128ea005bb73c075deaa5266ae4609d52214;p=irker.git Refactor. --- diff --git a/irker.py b/irker.py index f4988f8..da0c9ca 100755 --- a/irker.py +++ b/irker.py @@ -22,6 +22,7 @@ PORT = 4747 TTL = (3 * 60 * 60) # Connection time to live in seconds CONNECT_MAX = 18 # Maximum connections per bot (freenet limit) +NAMESTYLE = "irker%03d" # IRC nick template - must contain '%d' # No user-serviceable parts below this line @@ -120,7 +121,7 @@ class Irker: newserver = self.irc.server() newserver.connect(servername, port, - "irker%03d" % self.servercount) + NAMESTYLE % self.servercount) self.countmap[(servername, port)] = (1, newserver) return self.countmap[(servername, port)][1] def close(self, servername, port):