Subj : syncWXremix and Dial-up
To   : echicken
From : KenDB3
Date : Thu Jan 07 2016 01:11 am

 Re: syncWXremix and Dial-up
 By: echicken to KenDB3 on Wed Jan 06 2016 11:33 pm

ec> Re: syncWXremix and Dial-up
ec> By: KenDB3 to Digital Man on Wed Jan 06 2016 22:23:46

Ke>> var dialup = (parseInt(user.connection) > 0);

Ke>> However, tbird is still seeing an error when the app is launched at
Ke>> Logon and also as a Door/External for his dial-up user.

ec> parseInt() is probably the wrong thing for this particular case, because
ec> it tries to pull a number out of a string that may contain non-digit
ec> characters.

ec> parseInt('192.168.1.1'); // returns 192
ec> parseInt('4162737230'); // returns 4162737230

ec> Assuming that phone numbers will always be strings of digits, you could
ec> do:

ec> if(user.connection.search(/[^\d]/) < 0) {
ec> // Probably a phone number
ec> } else {
ec> // Probably not a phone number
ec> }

According to DM, user.connection should return a connection speed for a dialup
user (e.g. "28800") rather than a protocol string (e.g. "Telnet"). So the > 0
made sense. I gave it some mock data, and it returned "true" if I fed it 28800,
and "false" if I fed it the word Telnet.

I don't know SEXPOTS (or any dialup to telnet bridge) well enough to know if
the Caller ID was going to come back with 10-digit (4162737230), 11-digit
(14162737230), +1 format, or even the short 7-digit pattern. So, I was avoiding
testing the user.ip_address field even though the phone number was ending up
there. I'm not sure if that behavior is predictable across the board. If the
sysop had dialup but not Caller ID from thier telco, what does SEXPOTS drop
into the user.ip_address? Does it work in Europe? Tricky tricky. :-/

Quick question, do I have too many "=" when trying to match if "dialup" is
"true"? I suddenly thought of it 30 minutes ago. (Maybe go from === to ==)

~KenDB3