6. Implemented PC49 delete/full from outside (kill full on the inside)
[spider.git] / perl / client.pl
index a2a690cad22a1bd362c7b1cb5b6818b5687d7344..cc185a17838622f4c2631464ca4ea5554947b39a 100755 (executable)
@@ -374,6 +374,15 @@ if ($loginreq) {
        }
 }
 
+# handle callsign and connection type firtling
+sub doclient
+{
+       my $line = shift;
+       my @f = split /\s+/, $line;
+       $call = uc $f[0] if $f[0];
+       $csort = $f[1] if $f[1];
+}
+
 # is this an out going connection?
 if ($connsort eq "connect") {
        my $mcall = lc $call;
@@ -391,10 +400,14 @@ if ($connsort eq "connect") {
                doconnect($1, $2) if /^\s*co\w*\s+(\w+)\s+(.*)$/io;
                doabort($1) if /^\s*a\w*\s+(.*)/io;
                dotimeout($1) if /^\s*t\w*\s+(\d+)/io;
-               dochat($1, $2) if /\s*\'(.*)\'\s+\'(.*)\'/io;          
+               dochat($1, $2) if /\s*\'(.*)\'\s+\'(.*)\'/io;
+               if (/\s*cl\w+\s+(.*)/io) {
+                       doclient($1);
+                       last;
+               }
        }
        
-    dbg('connect', "Connected to $call, starting normal protocol");
+    dbg('connect', "Connected to $call ($csort), starting normal protocol");
        dbgsub('connect');
        
        # if we get here we are connected