* @return boolean\r
*/\r
public function validate($screenname) {\r
- // RFC 2822 (simplified) regexp\r
- if(preg_match('/[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i', $screenname)) {\r
- return true;\r
- } else {\r
- return false;\r
- }\r
+ return Validate::email($screenname, common_config('email', 'check_domain'));\r
}\r
\r
/**\r
\r
$this->debug_message("NS: <<< XFR SB");\r
$user = array_shift($this->waitingForXFR);\r
- $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message);\r
+ $bSBresult = $this->switchboard_control($ip, $port, $cki_code, $User, $Message);\r
/*\r
$bSBresult = $this->switchboard_control($ip, $port, $cki_code, $aMSNUsers[$nCurrentUser], $sMessage);\r
if ($bSBresult === false) {\r
case 'NLN':\r
// NS: <<< NLN {status} {email} {networkid} {nickname} {clientid} {dpobj}\r
// NS: <<< NLN NLN darkip@inflatablegoldfish.com 1 Luke 2685403136 0\r
- @list(/* NLN */, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);\r
- $this->callHandler('StatusChange', array('screenname' => $email, 'network' => $network, 'nickname' => $nickname));\r
+ @list(/* NLN */, $status, $email, $network, $nickname, /* clientid */, /* dbobj */,) = @explode(' ', $data);\r
+ $this->callHandler('StatusChange', array('screenname' => $email, 'status' => $status, 'network' => $network, 'nickname' => $nickname));\r
break;\r
\r
case 'OUT':\r