From cec1128ea005bb73c075deaa5266ae4609d52214 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 26 Aug 2012 20:20:29 -0400 Subject: [PATCH] Refactor. --- irker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.26.2