All pastes #727988 Raw Edit

Untitled

public php v1 · immutable
·published 2007-10-06 16:11 UTC
rendered paste body
<?phpinclude("includes/connect.inc");include("includes/functions.inc");srand(time());$fortunerand = (rand()%9)+0;$fortune = array("This bot was sponsored in part by losers like you. Thank you!","I'm powered by PHP. You're powered by food in your body. Go deal with it.","Dr. Pepper, Coke, or Pepsi? YOU BE THE JUDGE!","I know that you know that I know that you know that I know that you know that I am a bot. So stop asking for a fortune, I'm not THAT smart.","You will be taken by a band of pirates and beaten by their odd elvish friends, then sold to a rapist for prostitution and eventually you will die via a bolt of lightning. Oh yeah, have a nice life.","The next person to speak in this channel will be eaten by a random user.","U P|-|4I|L 4 G00D","For the love of myself, go get eaten by the number ".$fortunerand."!","i can use propar grammr!","ksgalsdjblahcnaiohehdksg. That is all.");// Identify to NickServfputs($socket,"PRIVMSG NICKSERV IDENTIFY ASDFNONEOFYOURBUISINESS\n");// Join channelfputs($socket,"JOIN #channelr\n");// Force an endless loopwhile(1) {    // Continue the rest of the script here    while($data = fgets($socket, 128)) {        echo nl2br($data);        flush();        // Separate all data        $ex = explode(' ', $data);        // Send PONG back to the server        if($ex[0] == "PING"){            fputs($socket, "PONG ".$ex[1]."\n");        }        // Say something in the channel        $command = str_replace(array(chr(10), chr(13)), '', $ex[3]);        if ($command == ":?fortune") {            fputs($socket, "PRIVMSG ".$ex[2]." :Your fortune: ".$fortune[$fortunerand]."\n");        }    }}?>