From 8e2d2c3cf84c44ac9acffe4736b1cc2c6c70cbd9 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 23 Jan 2006 23:15:38 +0000 Subject: [PATCH] get rcmd text largely working. --- perl/DXXml/Text.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/perl/DXXml/Text.pm b/perl/DXXml/Text.pm index 35c83191..a08cbda0 100644 --- a/perl/DXXml/Text.pm +++ b/perl/DXXml/Text.pm @@ -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 -- 2.34.1