if (strtolower(substr($msgwithoutident, 0, 4)) == 'part' && $data->host == "unaffiliated/aheartattack/x-000001") { $message = substr($msgwithoutident, 5, strlen($msgwithoutident)-5); $irc->part($message, $txt); $i = 0; global $channels; while ($i < count($channels)) { if ($channels[$i] == $message) { $channels[$i] = 'nothing'; return; } $i++; } }