From 05d964c32262a8b0ce3f8a5d2087d230a461df86 Mon Sep 17 00:00:00 2001 From: Jan Hruban Date: Wed, 15 Jun 2011 14:47:16 +0200 Subject: Bind to IPv6 address when -H is in IPv6 format --- protocols/skype/skyped.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'protocols/skype') diff --git a/protocols/skype/skyped.py b/protocols/skype/skyped.py index 023c1f81..c9bfc2ce 100644 --- a/protocols/skype/skyped.py +++ b/protocols/skype/skyped.py @@ -179,7 +179,10 @@ def bitlbee_idle_handler(skype): def server(host, port, skype = None): global options - sock = socket.socket() + if ":" in host: + sock = socket.socket(socket.AF_INET6) + else: + sock = socket.socket() sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind((host, port)) sock.listen(1) @@ -359,7 +362,7 @@ Options: -c --config path to configuration file (default: %s) -d --debug enable debug messages -h --help this help - -H --host set the tcp host (default: %s) + -H --host set the tcp host, supports IPv4 and IPv6 (default: %s) -l --log set the log file in background mode (default: none) -n --nofork don't run as daemon in the background -p --port set the tcp port (default: %s) -- cgit v1.2.3