All pastes #1005329 Raw Edit

Something

public text v1 · immutable
#1005329 ·published 2008-05-02 19:38 UTC
rendered paste body
	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 class=\"bodytext\">(.*?)<\/font>/i",$source,$error);
if ($error) { fputs($socket, "PRIVMSG $ex[2] :Error.\n"); }

preg_match("/<p class=\"qt\">(.*?)<\/p>/i",$source,$quote);

fputs($socket, "PRIVMSG $ex[2] :".str_replace("\r","PRIVMSG $ex[2] :",strip_tags($quote[1]))."\n");

}
}