All pastes #806410 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-12-05 06:59 UTC
rendered paste body
class z4znet {
		function irc() {
			$socket = fsockopen("irc.z4znet.com", 6667);
			fputs($socket,"USER ZeroSlave z4znet ZS :ZeroSlave\n");
			fputs($socket,"NICK ZeroSlave\n");
			fputs($socket,"JOIN #/dev/null\n");
			
			while(1) {

				while($data = fgets($socket, 128)) {

					flush();

					$ex = explode(' ', $data);
					
					if($ex[0] == "PING"){
            		fputs($socket, "PONG ".$ex[1]."\n");
        			}
        			
        			$command = str_replace(array(chr(10), chr(13)), '', $ex[3]);
        			if ($command == ":.test") {
        				fputs($socket, "PRIVMSG ".$ex[2]." :Confirmed.\n");
					}
				}
			}
		}
	}