rendered paste body$bot1 = new bot();
$bot1->connect(1);
$bot2 = new bot();
$bot2->connect(2);
$bot3 = new bot();
$bot3->connect(3);
class bot {
function connect($num) {
$this->me = "Spicy[".$num."]";
$this->chans = "#Spicy";
$this->context = stream_context_create();
stream_context_set_option($this->context,"socket","bindto","[2001:6f8:1139::2]:0");
$this->socket = stream_socket_client("tcp://".str_replace(array("1","2","3"),array("darklite.be.eu","illusion.tx.us","lunar.nl.eu"),rand(1,3)).".SwiftIRC.net:6667",$errno,$errstr,5,STREAM_CLIENT_CONNECT,$context);
stream_set_timeout($this->socket,-1);
raw("USER ".$me." \"\" \"irc.swiftirc.net\" :Spicy!");
raw("NICK ".$me);
raw("MODE ".$me." -x");
sleep(2);
raw("JOIN ".$chans);
}
function raw($info) {
fputs($this->socket,$info."\n");
}
}