if ($command == ":!bash") { if (!$ex[4]) { fputs($socket, "PRIVMSG $ex[2] :Error. Must specify a quote id.\n"); } else { $source = file_get_contents("http://www.bash.org/?quote=".$_REQUEST['id']); $source = str_replace("\n","",$source); preg_match("/(.*?)<\/font>/i",$source,$error); if ($error) { fputs($socket, "PRIVMSG $ex[2] :Error.\n"); } preg_match("/

(.*?)<\/p>/i",$source,$quote); fputs($socket, "PRIVMSG $ex[2] :".str_replace("\r","PRIVMSG $ex[2] :",strip_tags($quote[1]))."\n"); } }