All pastes #472319 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-05 14:12 UTC
rendered paste body
define("CHANNEL", "#pc");  //Set the channel the bot will join here
define("NICK", "[PC]slushpuppy");    //Set the bot's nick here
$socket=fsockopen('talon.nl.eu.SwiftIRC.net','6667') ;

stream_set_timeout($socket, 300); //Set a timeout value (so the bot quits if it's disconnected)

fwrite($socket, "NICK ".NICK."\r\n");

fwrite($socket, "USER ".NICK." 8 * :phpBot\r\n");  
while ($line=fgets($socket)) {
  if (strpos($line, "433")>0) die("error nick in use");  //Quit if bot's nick is already taken (irc code 433 is received)

  if (strpos($line, "004")>0) {
    fwrite($socket, "MODE ".NICK." +B \r\n");