X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=3226399746a15385b4582544994e4c0f7b959ba9;hb=f91073b99369ea05c42364f9462695be7a67016d;hp=f6d890b17c5919eb74254854fa7d77aea04b1c9f;hpb=61a666ccf108505f0cec2e5c682fde019fc3a051;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index f6d890b1..32263997 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -74,8 +74,11 @@ sub new # routing, this must go out here to prevent race condx my $pkg = shift; my $call = shift; -# my @rout = $main::routeroot->add_user($call, Route::here(1)); - DXProt::_add_thingy($main::routeroot, [$call, 0, 0, 1, undef, undef, $self->hostname], ); + # my @rout = $main::routeroot->add_user($call, Route::here(1)); + my $ipaddr = $self->hostname; + $ipaddr = $main::localhost_alias_ipv6 if $ipaddr eq '::1' && $main::localhost_alias_ipv6; + $ipaddr = $main::localhost_alias_ipv4 if $ipaddr =~ /^127\./ && $main::localhost_alias_ipv4; + DXProt::_add_thingy($main::routeroot, [$call, 0, 0, 1, undef, undef, $ipaddr], ); # ALWAYS output the user my $ref = Route::User::get($call); @@ -348,7 +351,7 @@ sub normal my $sendit = $cmdline =~ s|^/+||; if (@bad = BadWords::check($cmdline)) { $self->badcount(($self->badcount||0) + @bad); - LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with words: '" . join(',', @bad) . "'"); + LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with badwords: '" . join(',', @bad) . "'"); } else { my @in = $self->run_cmd($cmdline); $self->send_ans(@in); @@ -369,7 +372,7 @@ sub normal # send what has been said to whoever is in this person's talk list if (@bad = BadWords::check($cmdline)) { $self->badcount(($self->badcount||0) + @bad); - LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with words: '" . join(',', @bad) . "'"); + LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with badwords: '" . join(',', @bad) . "'"); } else { for (@{$self->{talklist}}) { if ($self->{state} eq 'talk') { @@ -401,12 +404,12 @@ sub normal } $self->send_ans(@ans); } else { - if (@bad = BadWords::check($cmdline)) { - $self->badcount(($self->badcount||0) + @bad); - LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with words: '" . join(',', @bad) . "'"); - } else { +# if (@bad = BadWords::check($cmdline)) { +# $self->badcount(($self->badcount||0) + @bad); +# LogDbg('DXCommand', "$self->{call} swore: '$cmdline' with badwords: '" . join(',', @bad) . "'"); +# } else { $self->send_ans(run_cmd($self, $cmdline)); - } +# } } # check for excessive swearing