From 0587af90a15f0cb2414be34260d1ef5450b3acdc Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 23 Jul 2014 19:22:15 +0200 Subject: [PATCH] Internet: Make @dns show all addresses. Closes GH-786. --- plugins/Internet/plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Internet/plugin.py b/plugins/Internet/plugin.py index 2e09a1623..72e884f29 100644 --- a/plugins/Internet/plugin.py +++ b/plugins/Internet/plugin.py @@ -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'])