X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXXml%2FText.pm;h=3496e0edad09355c7c382b7dc3fe0ff41d6b8464;hb=006e37a3ce71aa3c55833fade25f9c6c11734bb6;hp=35c83191e504fe8a5909e77ad6bb433012c3d60f;hpb=00279dee4d97b67f722b9be52e0d8a9840ed2ef1;p=spider.git diff --git a/perl/DXXml/Text.pm b/perl/DXXml/Text.pm index 35c83191..3496e0ed 100644 --- a/perl/DXXml/Text.pm +++ b/perl/DXXml/Text.pm @@ -12,9 +12,7 @@ package DXXml::Text; use DXDebug; use DXProt; -use IsoTime; -use Investigate; -use Time::HiRes qw(gettimeofday tv_interval); +use DXLog; use vars qw($VERSION $BRANCH @ISA %pings); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); @@ -29,13 +27,16 @@ sub handle_input my $self = shift; my $dxchan = shift; - # this is always routed - if ($self->{to} eq $main::mycall ) { - my $r = DXChannel::get($main::myalias); - $dxchan = $r if $r; + if ($self->{to} eq $main::mycall) { + my $tochan = DXChannel::get($self->{u} || $main::myalias); + if ($tochan) { + $tochan->send($self->tocmd); + } else { + dbg("no user or $main::myalias not online") if isdbg('chanerr'); + } + } else { + $self->route($dxchan); } - $self->route($dxchan); - } sub topcxx @@ -50,9 +51,9 @@ sub topcxx $line =~ s/\s*$//; Log('rcmd', 'out', $self->{to}, $line); if ($self->{u} && $dxchan->is_clx && $ref->is_clx) { - push @out, pc85($main::mycall, $self->{to}, $self->{u}, "$main::mycall:$line"); + push @out, DXProt::pc85($main::mycall, $self->{to}, $self->{u}, "$main::mycall:$line"); } else { - push @out, pc35($main::mycall, $self->{to}, "$main::mycall:$line"); + push @out, DXProt::pc35($main::mycall, $self->{to}, "$main::mycall:$line"); } }