2 # This class is the internal subclass that deals with the internal port 27754
3 # communications for Msg.pm
7 # Copyright (c) 2001 - Dirk Koopman G1TLH
14 use vars qw($VERSION $BRANCH);
15 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
16 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
17 $main::build += $VERSION;
18 $main::branch += $BRANCH;
28 goto &main::login; # save some writing, this was the default
33 my ($conn, $msg) = @_;
34 $msg =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg;
35 push (@{$conn->{outqueue}}, $msg . "\n");
42 if ($conn && $conn->{msg} =~ /\cJ/) {
43 my @lines = $conn->{msg} =~ /([^\cM\cJ]*)\cM?\cJ/g;
44 if ($conn->{msg} =~ /\cJ$/) {
47 $conn->{msg} =~ s/([^\cM\cJ]*)\cM?\cJ//g;
51 s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg;
55 &{$conn->{rproc}}($conn, $_) if exists $conn->{rproc};