X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;h=4a1acbba2858c37745d31fee704e245893fc0d39;hb=aafd54016bd01fa5b3dc717dbb9cb267f5376dc4;hp=99e2bfe5fe55692b5d70adc418f6e1b235ff7719;hpb=bca5cd40374f12da5e0d46980e54bffc61fdc9c9;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index 99e2bfe5..4a1acbba 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -24,7 +24,6 @@ use DXLogPrint; use DXBearing; use CmdAlias; use Filter; -use Carp; use Minimuf; use DXDb; use Sun; @@ -84,7 +83,7 @@ sub start my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database"; my $cuser = DXNodeuser->new($self, $node, $call, 0, 1); $node->dxchan($self) if $call eq $main::myalias; # send all output for mycall to myalias - + # issue a pc16 to everybody interested my $nchan = DXChannel->get($main::mycall); my @pc16 = DXProt::pc16($nchan, $cuser); @@ -246,7 +245,7 @@ sub run_cmd unless (exists $Cache{$package}->{'sub'}) { $c = eval $Cache{$package}->{'eval'}; if ($@) { - return ("Syserr: Syntax error in $package", $@); + return DXDebug::shortmess($@); } $Cache{$package}->{'sub'} = $c; } @@ -255,7 +254,10 @@ sub run_cmd @ans = &{$c}($self, $args); }; - return ($@) if $@; + if ($@) { + cluck($@); + return (DXDebug::shortmess($@)); + }; } } else { dbg('command', "cmd: $cmd not found"); @@ -297,6 +299,9 @@ sub finish my $self = shift; my $call = $self->call; + # I was the last node visited + $self->user->node($main::mycall); + # log out text if (-e "$main::data/logout") { open(I, "$main::data/logout") or confess;