setmode();
# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
+$call =~ s/-0$//; # strip off -0 as this is equiv to just call on its own
my ($scall, $ssid) = split /-/, $call;
$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
if ($ssid) {
"^[0-9]+[A-Z]+[0-9]+[A-Z]+[1-9]?$", 0 /* 2E0AAA 2E0AAA1 */
},
{
- "^[A-Z]+[0-9]+[A-Z]+-[1-9]$", 0 /* G1TLH-2 */
+ "^[A-Z]+[0-9]+[A-Z]+-[0-9]$", 0 /* G1TLH-2 */
},
{
- "^[0-9]+[A-Z]+[0-9]+[A-Z]+-[1-9]$", 0 /* 2E0AAA-2 */
+ "^[0-9]+[A-Z]+[0-9]+[A-Z]+-[0-9]$", 0 /* 2E0AAA-2 */
},
{
"^[A-Z]+[0-9]+[A-Z]+-1[0-5]$", 0 /* G1TLH-11 */
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
+
+ /* strip off a '-0' at the end */
+ i = strlen(call);
+ if (call[i-1] == '0' && call[i-2] == '-')
+ call[i-2] = 0;
alarm(0);
signal(SIGALRM, SIG_IGN);
send_text(in, "login: ", 7, 0);
chgstate(WAITLOGIN);
} else {
-
+ int i;
+
/* check the callsign against the regexes */
if (!iscallsign(call)) {
die("Sorry, %s isn't a valid callsign", call);
}
+ /* strip off a '-0' at the end */
+ i = strlen(call);
+ if (call[i-1] == '0' && call[i-2] == '-')
+ call[i-2] = 0;
+
/* tell the cluster who I am */
send_msg(node, 'A', connsort, strlen(connsort));