Internet: Make @dns show all addresses. Closes GH-786.

This commit is contained in:
Valentin Lorentz 2014-07-23 19:22:15 +02:00
parent 0ce8ef8299
commit 0587af90a1

View File

@ -56,8 +56,9 @@ class Internet(callbacks.Plugin):
irc.reply(hostname) irc.reply(hostname)
else: else:
try: try:
ip = socket.getaddrinfo(host, None)[0][4][0] ips = socket.getaddrinfo(host, None)
irc.reply(ip) ips = map(lambda x:x[4][0], ips)
irc.replies(ips)
except socket.error: except socket.error:
irc.reply(_('Host not found.')) irc.reply(_('Host not found.'))
dns = wrap(dns, ['something']) dns = wrap(dns, ['something'])