".chr(3).chr(2).chr(3)."12<".$nickname."> ".chr(3).$to_receive."\n"); $to_receive = ""; } } // Say something in the channel $command = trim($ex[3]); //Main channel commands if ($channel == "#the.ruthless") { if ($command == ":!sctfl" && !isset($floodtime)) { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2).$nickname.chr(2).chr(3)."7» ".chr(3)."0 would like an SCTFL match\n"); fputs($socket, "PRIVMSG #the.ruthless :".chr(3)."7,1 «".chr(3)."0".chr(2)."The members have been informed.".chr(2).chr(3)."7» ".chr(3)."\n"); $floodtime = time() + 5; } while (isset($floodtime)) { if (time() > $floodtime) { unset($floodtime); } } } //Priv Chan commands if ($channel == "#ruth.priv") { if ($command == ":!muffin") { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2)."Muffin Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://u13.net:20000/muffin\n"); } if ($command == ":!server") { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2)."Ruthless Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://208.70.146.121:70000/ruth\n"); } if ($command == ":!OC") { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2)."OC Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://208.70.146.121:41337/newera\n"); } if ($command == ":!deth") { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2)."DETH Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://208.70.146.121:25555/ugapa\n"); } if ($command == ":!LP") { fputs($socket, "PRIVMSG #ruth.priv :".chr(3)."7,1 «".chr(3)."0".chr(2)."LP Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://u13.net:30089/LP\n"); } if ($command == ":!roll") { fputs($socket, "PRIVMSG #ruth.priv : ".$nickname." rolled ".chr(2).rand(0,15).chr(2)."\n"); } if ($command == ":!serv") { fputs($socket, "PRIVMSG ".$ex[4].":".chr(3)."7,1 «".chr(3)."0".chr(2)."Ruthless Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://208.70.146.121:70000/ruth\n"); fputs($socket, "PRIVMSG #ruth.priv :Server info sent to ".$ex[4]."\n"); } if ($command == ":!servlast") { fputs($socket, "PRIVMSG ".$lastnick.":".chr(3)."7,1 «".chr(3)."0".chr(2)."Ruthless Server".chr(2).chr(3)."7» ".chr(3)."0 soldat://208.70.146.121:70000/ruth\n"); fputs($socket, "PRIVMSG #ruth.priv :Server info sent to ".$lastnick."\n"); } if ($command == ":!m" && count($ex) > 4) { //message $to_send .= ""; for($i = 5;$i < count($ex);$i++){ $to_send = $to_send." ".trim($ex[$i]); } fputs($socket, "PRIVMSG ".$ex[4]." :".chr(3)."12<".$nickname.">".chr(3).$to_send."\n"); $to_send = ""; } if ($command == ":!r" && count($ex) > 4) { //reply $to_reply .= ""; for($i = 4;$i < count($ex);$i++){ $to_reply = $to_reply." ".trim($ex[$i]); } fputs($socket, "PRIVMSG ".$lastnick." :".chr(3)."12<".$nickname.">".chr(3).$to_reply."\n"); $to_reply = ""; } //Changes nick if ($command == ":!nick") { fputs($socket, "NICK ".$ex[4]."\n"); $mynickname = $ex[4]; } //Joins channel if ($command == ":!j") { fputs($socket, "JOIN ".$ex[4]." ".$ex[5]."\n"); } //Leaves channel if ($command == ":!p") { fputs($socket, "PART ".$ex[4]." ".$ex[5]."\n"); } //Auths/+x if ($command == ":!auth") { fputs($socket, "PRIVMSG Q@CServe.quakenet.org :AUTH Ruthless Xbox360\n"); fputs($socket, "MODE ".$mynickname." +x\n"); } // To quit the bot if($command == ":!quit" && $hostname == "Lordrohith-.users.quakenet.org"){ fputs($socket,"QUIT :lolquitmsg\n"); } } } fclose($socket); ?>