X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXXml%2FCmd.pm;h=f56c270e80f478444c36957da15bbed5976b36f0;hb=0a81dd5596a3bd7746f00bad8f7c61b8d823a2ac;hp=821606afb65df2272b1df5cb966b8212cf16abcb;hpb=bc67e4afa9b3c9fcf0e537e04a743ad5852356e6;p=spider.git diff --git a/perl/DXXml/Cmd.pm b/perl/DXXml/Cmd.pm index 821606af..f56c270e 100644 --- a/perl/DXXml/Cmd.pm +++ b/perl/DXXml/Cmd.pm @@ -14,8 +14,8 @@ use DXDebug; use DXProt; use IsoTime; use Investigate; -use Time::HiRes qw(gettimeofday tv_interval); use DXXml::Text; +use DXLog; use vars qw($VERSION $BRANCH @ISA %pings); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); @@ -35,7 +35,7 @@ sub handle_input my $cmd = $self->{content}; - if ($self->{o} eq $dxchan->call) { # online user or node + if ($self->{u} && $self->{u} eq $dxchan->call) { # online user or node @in = (DXCommandmode::run_cmd($dxchan, $cmd)); } else { # remote command @@ -56,8 +56,8 @@ sub handle_input } Log('rcmd', 'in', $ref->{priv}, $self->{o}, "$self->{content}($answer)"); } - my $rep = DXXml::Text->new(u=>$self->{u}, to=>$self->{o}, content=>join('%0A', @in)); - $rep->route($dxchan); + my $rep = DXXml::Text->new(u=>$self->{u}, to=>$self->{o}, content=>join('%0A', map {"$main::mycall:$_"} @in)); + $rep->route($main::me); # because it's coming from me! } else { $self->route($dxchan); }