Subj : syncWXremix and Dial-up To : echicken From : Digital Man Date : Wed Jan 06 2016 10:06 pm Re: syncWXremix and Dial-up By: echicken to KenDB3 on Wed Jan 06 2016 11:33 pm > Re: syncWXremix and Dial-up > 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. > > parseInt() is probably the wrong thing for this particular case, because it > tries to pull a number out of a string that may contain non-digit > characters. > > parseInt('192.168.1.1'); // returns 192 > parseInt('4162737230'); // returns 4162737230 > > Assuming that phone numbers will always be strings of digits, you could do: > > if(user.connection.search(/[^\d]/) < 0) { > // Probably a phone number > } else { > // Probably not a phone number > } He's using parseInt() on the user.connection property, which should either be a terminal-protocol string (e.g. "Telnet", "Rlogin", "SSH") or a modem DCE (connect) rate (e.g. "28800"). There should not ever be an IP address or a phone number in the user.connection property. Or maybe I missed this other use of parseInt()? digital man Synchronet "Real Fact" #42: Synchronet added Baja/PCMS support with v2.00a (1994). Norco, CA WX: 47.9øF, 91.0% humidity, 3 mph WNW wind, 0.60 inches rain/24hrs .