I locally hacked the IPv6 support by changing the following line:
- self.irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.irc = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
But this is not a nice solution since the library now has no more option to connect to an IPv4 server. It would be nice, if the library would be able to handle both IP versions automatically.
Ideas:
- Use
ipaddress.ip_address(self.network).version to determine the IP version (if self.network is an IP-Address)
- Use the dns result for hostnames (by prefering IPv6 over IPv4)
I locally hacked the IPv6 support by changing the following line:
But this is not a nice solution since the library now has no more option to connect to an IPv4 server. It would be nice, if the library would be able to handle both IP versions automatically.
Ideas:
ipaddress.ip_address(self.network).versionto determine the IP version (ifself.networkis an IP-Address)