From: Luke Fitzgerald Date: Thu, 5 Aug 2010 18:12:36 +0000 (-0700) Subject: Use nick length instead X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6e865c47ad923f2c4cf97b1966f9eb9baad4553;p=quix0rs-gnu-social.git Use nick length instead --- diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php index 5b5cab2ec5..8fda359452 100644 --- a/plugins/Irc/IrcPlugin.php +++ b/plugins/Irc/IrcPlugin.php @@ -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 {