All pastes #673822 Raw Edit

Someone

public php v1 · immutable
#673822 ·published 2007-08-28 18:29 UTC
rendered paste body
if ($command == ":!startguess") {    unset($guesses);    $guessing = TRUE;    $highest = $ex[4];    $low = 0;    $high = $highest;    $rand = rand(0,$highest);    fputs($socket, "PRIVMSG ".$ex[2]." :\$guess ".$rand."\r\n");}if ($command == ":!stopguess") {    $guessing = FALSE;}if ((strstr($command,"$nick>"))) {    if ($guessing == TRUE) {        if (strstr(trim($ex[4]), "HIGHER")) $low = $rand;        if(strstr(trim($ex[4]), "LOWER")) $high = $rand;        $rand = rand($low, $high);        while(in_array($rand, $guesses)) {            $rand = rand($low, $high);        }        $guesses[] = $rand;        fputs($socket, "PRIVMSG ".$ex[2]." :\$guess ".$rand."\r\n");    }}if ($command == ":!guesses") {    foreach($guesses as $key => $guess) {        fputs($socket, "PRIVMSG ".$ex[2]." :$key => $guess\r\n");    }}