Index: bitflu.pl --- bitflu.pl.orig 2007-02-24 12:26:16 +0100 +++ bitflu.pl 2007-02-25 12:42:50 +0100 @@ -188,6 +188,7 @@ #Options with getopt support: # 1. prio: commandline switch , 2.nd: rcfile 3th: defaults $config->{client}->{port} = $getopts{torrent} || $config->{client}->{port} || 6688; # BitTorrent incoming port (UDP and TCP) +$config->{client}->{bind} ||= 0; $config->{client}->{telnet} = $getopts{telnet} if defined($getopts{telnet}); $config->{client}->{telnet} = 4001 unless defined($config->{client}->{telnet}); @@ -225,7 +226,7 @@ $config->{client}->{notifycompleted} = 0 unless defined($config->{client}->{notifycompleted}); #WALL about completed downloads # Lock Non-Runtime vars -foreach (qw(rootdir downloaddir http httpbind port telnet telnetbind key peerid chroot runas_gid runas_uid userauth)) { +foreach (qw(rootdir downloaddir http httpbind port bind telnet telnetbind key peerid chroot runas_gid runas_uid userauth)) { $config->{client_locked}->{$_} = 1; } @@ -245,7 +246,7 @@ $config->{SYS}->{kick_refreshpeers} = 0; $config->{SYS}->{kick_autoload} = 0; # ugly: used by other classes -print Data::Dumper::Dumper($config->{client}); +#print Data::Dumper::Dumper($config->{client}); # DHT: # should fork, secure_process() and launch DHT @@ -257,7 +258,7 @@ l(L_WARN, "Bitflu ".BITFLU_VERSION." (build: ".BITFLU_BUILD.") starting ..."); my $torrent_handle = new IO::Select(); - my $torrent_socket = IO::Socket::INET->new(LocalPort=>$config->{client}->{port}, + my $torrent_socket = IO::Socket::INET->new(LocalPort=>$config->{client}->{port}, LocalAddr=>$config->{client}->{bind}, Proto=>'tcp', Listen=>1, ReuseAddr=>1) or die "$0 Unable to bind to $config->{client}->{port} : $!\n"; $torrent_handle->add($torrent_socket); @@ -1166,7 +1167,7 @@ } elsif($ACSTAT{$sock}->{AUTH_STATE} == TELNET_CLIENT_WAITFORUSER) { $ACSTAT{$sock}->{GIVEN_USER} = substr($full_data,0,-2); - _xwA($sock, "# Password : "); + _xwA($sock, "# Password: "); $ACSTAT{$sock}->{AUTH_STATE} = TELNET_CLIENT_WAITFORPASS; } elsif($ACSTAT{$sock}->{AUTH_STATE} == TELNET_CLIENT_WAITFORPASS) {