There is now some hope of making the irkbot support multiple VCSes.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 27 Sep 2012 07:13:24 +0000 (03:13 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 27 Sep 2012 07:13:24 +0000 (03:13 -0400)
Makefile
irkbot.py [moved from git-irkbot.py with 96% similarity]

index 4068b0b049601e7edab41fac11d1b3f2c910e1ae..500df423eda1211e79a0909fd7ac15a06959e4e2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,13 @@ clean:
        rm -f irker irker.1 irker-*.rpm irker-*.tar.gz *~
        rm -f SHIPPER.* *.html
 
-PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101,W0621"
+PYLINTOPTS = --rcfile=/dev/null --reports=n --include-ids=y --disable="C0103,C0111,C0301,R0201,R0902,R0903,E1101,W0621,W0702"
 pylint:
        @pylint --output-format=parseable $(PYLINTOPTS) irker
-       @pylint --output-format=parseable $(PYLINTOPTS) git-irkbot.py
+       @pylint --output-format=parseable $(PYLINTOPTS) irkbot.py
 
 
-SOURCES = README COPYING NEWS irker git-irkbot.py Makefile irker.xml irker-logo.png
+SOURCES = README COPYING NEWS irker irkbot.py Makefile irker.xml irker-logo.png
 
 version:
        @echo $(VERS)
similarity index 96%
rename from git-irkbot.py
rename to irkbot.py
index d7df6c15a145ad5f996a515372420e66eefe30c6..278eb3103902b46cae182b5abef801ceb008d1aa 100755 (executable)
+++ b/irkbot.py
@@ -161,17 +161,17 @@ if __name__ == "__main__":
         print message
     else:
         try:
-            if tcp:
+            if extractor.tcp:
                 try:
                     sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-                    sock.connect((server, IRKER_PORT))
+                    sock.connect((extractor.server or default_irker_host, IRKER_PORT))
                     sock.sendall(message + "\n")
                 finally:
                     sock.close()
             else:
                 try:
                     sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-                    sock.sendto(message + "\n", (server, IRKER_PORT))
+                    sock.sendto(message + "\n", (extractor.server or default_irker_host, IRKER_PORT))
                 finally:
                     sock.close()
         except socket.error, e: