- if ($pcno == 26) {last SWITCH;}
- if ($pcno == 27) {last SWITCH;}
- if ($pcno == 28) {last SWITCH;}
- if ($pcno == 29) {last SWITCH;}
- if ($pcno == 30) {last SWITCH;}
- if ($pcno == 31) {last SWITCH;}
- if ($pcno == 32) {last SWITCH;}
- if ($pcno == 33) {last SWITCH;}
- if ($pcno == 34) {last SWITCH;}
- if ($pcno == 35) {last SWITCH;}
- if ($pcno == 36) {last SWITCH;}
+
+ if (($pcno >= 28 && $pcno <= 33) || $pcno == 40 || $pcno == 42) { # mail/file handling
+ DXMsg::process($self, $line);
+ return;
+ }
+
+ if ($pcno == 34 || $pcno == 36) { # remote commands (incoming)
+ if ($field[1] eq $main::mycall) {
+ if ($self->{priv}) { # you have to have SOME privilege, the commands have further filtering
+ $self->{remotecmd} = 1; # for the benefit of any command that needs to know
+ for (DXCommandmode::run_cmd($self, $field[3])) {
+ s/\s*$//og;
+ $self->send(pc35($main::mycall, $self->{call}, "$main::mycall:$_"));
+ }
+ delete $self->{remotecmd};
+ }
+ } else {
+ route($field[1], $line);
+ }
+ return;
+ }
+
+ if ($pcno == 35) { # remote command replies
+ if ($field[1] eq $main::mycall) {
+ my $s = DXChannel::get($main::myalias);
+ my @ref = grep { $_->pc34to eq $field[2] } DXChannel::get_all(); # people that have rcmded someone
+ push @ref, $s if $s;
+
+ foreach (@ref) {
+ $_->send($field[3]);
+ }
+ } else {
+ route($field[1], $line);
+ }
+ return;
+ }
+