Update Internet.dns to handle IPv6 IPs and responses

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit d56381436c)

Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
This commit is contained in:
James Vega 2011-06-06 22:28:35 -04:00 committed by Daniel Folkinshteyn
parent 36eb3501cf
commit 5c9139990b
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
### ###
# Copyright (c) 2003-2005, Jeremiah Fincher # Copyright (c) 2003-2005, Jeremiah Fincher
# Copyright (c) 2010, James Vega # Copyright (c) 2010-2011, James Vega
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -53,7 +53,7 @@ class Internet(callbacks.Plugin):
irc.reply(hostname) irc.reply(hostname)
else: else:
try: try:
ip = socket.gethostbyname(host) ip = socket.getaddrinfo(host, None)[0][4][0]
if ip == '64.94.110.11': # Verisign sucks! if ip == '64.94.110.11': # Verisign sucks!
irc.reply('Host not found.') irc.reply('Host not found.')
else: else: