Hi,
I've been doing some hacking of Net::IRC in an
attempt to add support for IPv6. The attached patch is
the result of my efforts.
By updating the server() method in
Net::IRC::Connection, to properly recognise and parse
IPv6 addresses ("[0123:4567:89ab::cdef]:6667"), and
updating the class to use IO::Socket::INET6 (simple
search-and-replace), I found I was able to convince a
Perlbot to connect to an IPv6-enabled IRC server.
This modified plugin has been tested with a local
IPv6 server (accessible via irc.redhatters.yi.org on
IPv6 or irc.longlandclan.hopto.org on IPv4), and on
AustNET (irc.austnet.org on IPv4). The module remains
backward compatable with IPv4 hosts.
I have not tested this with a SSL host.
IO::Socket::SSL AFAIK does have support for IPv6, but
the hosts I use are non-SSL.
I'm not sure how one makes IPv6 support conditional
using the ExtUtils::MakeMaker class ... ideally this
should be optional... that is... if enabled, it uses
IO::Socket::INET6 to connect, otherwise, it uses
IO::Socket::INET.
Anyways, here it is. Simply apply using `patch -p1`.
To use with Perlbot (DEVEL branch), use a line in your
config.xml like this:
<server address="[2001:388:c116:1::1]" />
IPv6 Support Patch