Update Internet.dns to handle IPv6 IPs and responses

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2011-06-06 22:28:35 -04:00
parent 543e78828b
commit d56381436c

View File

@ -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: