Use nick length instead

This commit is contained in:
Luke Fitzgerald 2010-08-05 11:12:36 -07:00
parent 1f3dbe1198
commit a6e865c47a

View File

@ -182,8 +182,9 @@ class IrcPlugin extends ImPlugin {
if (strpos($data['source'], '#') === 0) {
$message = $data['message'];
$nickpos = strpos($message, $this->nick);
$colonpos = strpos($message, ':', $nickpos);
if ($nickpos === 0 && $colonpos == strlen($this->nick)) {
$nicklen = strlen($this->nick);
$colonpos = strpos($message, ':', $nicklen);
if ($nickpos === 0 && $colonpos == $nicklen) {
$this->handle_incoming($data['sender'], substr($message, $colonpos+1));
}
} else {