Subject: | localaddr() returns ip in the wrong format, breaks DCC. |
localaddr is discovered in IRC.pm on line 380 with unpack_sockaddr_in,
which gives an internal format for the ip: "the port and an opaque
string representing the IP address (you can use inet_ntoa() to convert
the address to the four-dotted numeric format)"
Unfortunately inet_ntoa is not used to convert it into the normal
"W.X.Y.Z" text format, so later uses of localaddr() are wrong. One
example is DCC.pm line 191, here it tries to convert the already
internalized ip once more, which ofc doesn't work, resulting in DCC
SEND using 0.0.0.0 as ip.
So, the fix is to either add an inet_ntoa() call to _sock_up() in
IRC.pm, or remove the entire if-block on lines 191-193 in DCC.pm.