Only prints /msg 's one word if 2 or more are entered... if (strtolower(substr($msgwithoutident, 0, 3)) == 'msg' && $data->host == "unaffiliated/aheartattack/x-000001") { $message = substr($msgwithoutident, 4, strlen($msgwithoutident)-4); $irc->message(SMARTIRC_TYPE_QUERY, $message); }