$pong = substr($data, strlen("PING :")); cmd_send("PONG :" . $pong); } elseif (!empty($data)) { $message = new ircMsg($data); if ($output && $rawOutput == FALSE) { $smartData = array('command' => strtolower($message->getCommand()), 'message' => $message); $modules->hook('smartOutput', $smartData); } elseif ($output == TRUE) { echo $data; } $command = trim(strtolower($message->getCommand())); if ($command == "privmsg") { // First part of this is ensuring that the user/channel isn't on the ignore list. $parameters = $message->getParameters(); $preWhere = trim($parameters[0]); if ($preWhere == $message->getNick()) { $where = $message->getNick(); } else { $where = $parameters[0]; } $chanSearch = array_search($where, $quietArray); $nickSearch = array_search($message->getNick(), $quietArray); if ($chanSearch === FALSE && $nickSearch === FALSE) { $modules->hook($command, $message); } } else { $modules->hook($command, $message); } } } }