Refactor.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 27 Aug 2012 00:20:29 +0000 (20:20 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 27 Aug 2012 00:20:29 +0000 (20:20 -0400)
irker.py

index f4988f8260713b7e7fa0dd4ec05baf58d8c88183..da0c9caa267b74225379bf85996855ae854bd922 100755 (executable)
--- 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):