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 Logon
Ke> 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
}
---
echicken
electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
|