get rcmd text largely working.
authorminima <minima>
Mon, 23 Jan 2006 23:15:38 +0000 (23:15 +0000)
committerminima <minima>
Mon, 23 Jan 2006 23:15:38 +0000 (23:15 +0000)
perl/DXXml/Text.pm

index 35c83191e504fe8a5909e77ad6bb433012c3d60f..a08cbda0ded9623ec17ac12095956f786a61e868 100644 (file)
@@ -29,13 +29,17 @@ 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) {
+                       my $ref = $self->tocmd;
+                       $tochan->send($_) for (ref $ref ? @$ref : $ref);
+               } else {
+                       dbg("no user or $main::myalias not online") if isdbg('chanerr');
+               }
+       } else {        
+               $self->route($dxchan);
        }
-       $self->route($dxchan);
-
 }
 
 sub topcxx