Public feed #890779

Someone

public text v1 · immutable
Raw Edit
·published 2008-02-04 01:57 UTC
rendered paste body
<?php

 ##All External Files##
	require_once('config.php');


 ##Open Connection##
$sock = fsockopen($host,$port)
		or die('Connection failed: '.$errstr);


 ##Register And Join Defaul Chans##
if ($idef != 'idef') {
		fputs($sock,"USER $nick $host $host :$nick\n");
		fputs($sock,"NICK :$nick\n");
		fputs($sock,"JOIN $default_chan\n");
		$iden = 'idef';
}


 ##Keep On Looping
while (1) {


 ##Get And Print Buffer##
$raw_buf = fgets($sock);
		print $raw_buf;


 ##Ping And Pong##
if (preg_match('/^PING (.*?)$/',$raw_buf,$raw_ping) > 0 ){
	fputs($sock,"PONG $raw_ping[1]\n");
}


 ##We Start With The Actual Functions##
##if (preg_match("/^:

}