<?php set_time_limit(0); $socket = fsockopen("irc.***.com", 6667); fputs($socket,"NICK megabotinok\n"); fputs($socket,"USER megabotinok 8 * :lamobot\n"); fputs($socket,"quote pong 2B8C8B2D\n"); fputs($socket,"JOIN #bash.org\n"); while(1) { while($data = fgets($socket, 128)) { echo nl2br($data); 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 == ":!say") { fputs($socket, "PRIVMSG ".$ex[2]." :ПОНИ ТОЖЕ КОНИ!!!!!!!!!\n"); } } } ?>