summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-12-01 12:06:14 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-12-01 12:06:14 +0100
commit50760a202b4d655d828cd420fa5745210e33f657 (patch)
tree673298f527ce71d2a3d76c1726660911be43fd33
parent447d3728b7933e93ac00949c8735f8cf416a4c06 (diff)
Added a parser option for port.
-rwxr-xr-xgitnoti.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitnoti.py b/gitnoti.py
index e1f2de3..b18f26d 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -31,6 +31,7 @@ except:
parser = OptionParser()
parser.add_option('-s', '--host')
+parser.add_option('-p', '--port', type = 'int', default = 6667)
parser.add_option('-n', '--nick', default = 'git')
parser.add_option('-d', '--dir')
parser.add_option('-c', '--channel')
@@ -351,5 +352,5 @@ class BotFactory(protocol.ReconnectingClientFactory):
if __name__ == '__main__':
f = BotFactory()
- reactor.connectTCP(options.host, 6667, f)
+ reactor.connectTCP(options.host, options.port, f)
reactor.run()