");
$sock = fsockopen(gethostbyname($conf[6]),$conf[7]) or die("Couldnt create the socket to the server.
");
fwrite($log,"Socket connected to the server, attempting to authenticate.
");
fputs($sock,"USER ".$conf[1]." firez.com ".$conf[1]." :".$conf[2]."\n") or die("Socket error.
");
fputs($sock,"NICK ".$conf[3]."\n") or die("Socket error.
");
fwrite($log,"Authenticated, bot is fully operating.
");
fputs($sock,"JOIN ".$conf[5]) or die("Socket error.
");
while(1) {
while ($data = fgets($sock)) {
fwrite($log,$data);
$info = explode(" ",$data);
if ($info[0] == "PING") {
fputs($sock,"PONG ".$info[1]."\n");
}
}
}
?>