rendered paste bodyif ($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"); }}