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
1 changed files with 3 additions and 2 deletions

View File

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