weechat/weechat — pull request #173 by talisein (2014-08-20 05:10:15+00:00)
Title: xfer: bind to wildcard address when sending

When #5 was fixed, we started to always bind to the local address
connected to the irc server because the xfer.network.own_ip address
may not be able to be bound to when NATed. But this means when the
own_ip address is a different family (IPv4 vs IPv6) from the irc
server connection, we were listening for connections on the wrong
interface.

This patch lets us figure out which family is being used,
(xfer.network.own_ip's family, or the irc connection's family
otherwise) and bind() into the correct family via that family's
wildcard address.