#! /usr/bin/php5 setServer("irc.freenode.net", 6667); //$bot -> setServer("irc.eloxoph.com", 6667); $bot -> setPrefix("+"); $bot -> setAutoReconnect(true); $bot -> setSleep(0.75); //seconds to sleep when nothing is todo $bot -> addChannels(array("#botted", "#starsim", "##available", "##ircbots")); //$bot -> addChannels(array("#eloxoph", "#pb42")); $bot -> connect(); while($bot -> alive){ $data = $bot -> recv(); if($data["command"] == "mainloop"){ $bot -> call("privmsg", $data["origin"], "Place hardcoded commands here. Your current level: ".$data["level"]); } unset($data); } //--- End of mainloop here //bot should quit and shutdown after mainloop. $bot -> setAutoReconnect(false); $bot -> call("quit", "Mainloop terminated."); unset($bot); ?>