From 50760a202b4d655d828cd420fa5745210e33f657 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 1 Dec 2010 12:06:14 +0100 Subject: Added a parser option for port. --- gitnoti.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- cgit v1.2.3