From d56381436c3dc9e574384a3c935ecf18fbb024f7 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 6 Jun 2011 22:28:35 -0400 Subject: [PATCH] Update Internet.dns to handle IPv6 IPs and responses Signed-off-by: James Vega --- plugins/Internet/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Internet/plugin.py b/plugins/Internet/plugin.py index 490c9165c..eb5354394 100644 --- a/plugins/Internet/plugin.py +++ b/plugins/Internet/plugin.py @@ -1,6 +1,6 @@ ### # Copyright (c) 2003-2005, Jeremiah Fincher -# Copyright (c) 2010, James Vega +# Copyright (c) 2010-2011, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ class Internet(callbacks.Plugin): irc.reply(hostname) else: try: - ip = socket.gethostbyname(host) + ip = socket.getaddrinfo(host, None)[0][4][0] if ip == '64.94.110.11': # Verisign sucks! irc.reply('Host not found.') else: