sopel
sopel copied to clipboard
[ip] Include IP in .ip output
It'd be useful to be able to use .ip
to get an IP from a hostname. Currently it only shows the IP if there isn't a hostname, would it not be good to also add the IP in front of it?
current:
<Kemo> .ip bui.pm
<Lloid> [IP/Host Lookup] Hostname: bui.pm | Location: United States | Region: CA | ISP: FranTech Solutions
proposed:
<Kemo> .ip bui.pm
<Lloid> [IP/Host Lookup] IP: 209.141.38.71 | Hostname: bui.pm | Location: United States | Region: CA | ISP: FranTech Solutions
How would you handle A records with more than one IP?
How would you handle IPv6 / or IPv6 + IPv4 dual stack?
Maybe an additional command for lookups? Easy enough with socket.getaddrinfo