diff options
| author | Jan Hruban <hrubi13@gmail.com> | 2011-06-15 14:47:16 +0200 | 
|---|---|---|
| committer | Jan Hruban <hrubi13@gmail.com> | 2011-06-15 14:47:16 +0200 | 
| commit | 05d964c32262a8b0ce3f8a5d2087d230a461df86 (patch) | |
| tree | b8d103dba120a4ccc12559b3365a4b506f15aeae | |
| parent | bd114221b85ae8c1ffec41f1be98570030d33e03 (diff) | |
Bind to IPv6 address when -H is in IPv6 format
| -rw-r--r-- | protocols/skype/skyped.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| 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) | 
