Skip to content

Commit

Permalink
Use dotted-quad format for localaddr()
Browse files Browse the repository at this point in the history
Remove that dubious if block from DCC.pm. POE::Wheel::SocketFactory
accepts dotted quads anyway. This should allow the DCC plugin to bind
to an arbitrary interface when so requested.
  • Loading branch information
hinrik committed Aug 18, 2009
1 parent 8002b7d commit 9e6007f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Changes
@@ -1,5 +1,8 @@
Revision history for Perl extension POE::Component::IRC.

6.11
- Fix localaddr() issue reported in RT #48791 by Michael Andreen

6.10 Fri Aug 14 21:19:07 BST 2009
- Time for a stable release

Expand Down
2 changes: 1 addition & 1 deletion lib/POE/Component/IRC.pm
Expand Up @@ -378,7 +378,7 @@ sub _sock_up {
}

$localaddr = (unpack_sockaddr_in( getsockname $socket ))[1] if !$localaddr;
$self->{localaddr} = $localaddr;
$self->{localaddr} = inet_ntoa($localaddr);

if ( $self->{socks_proxy} ) {
$self->{socket} = new POE::Wheel::ReadWrite(
Expand Down
3 changes: 0 additions & 3 deletions lib/POE/Component/IRC/Plugin/DCC.pm
Expand Up @@ -188,9 +188,6 @@ sub _U_dcc {
}

$bindaddr = $irc->localaddr();
if ($bindaddr && $bindaddr =~ tr/a-zA-Z.//) {
$bindaddr = inet_aton($bindaddr);
}

if ($self->{dccports}) {
$bindport = shift @{ $self->{dccports} };
Expand Down

0 comments on commit 9e6007f

Please sign in to comment.