34 lines
927 B
PHP
34 lines
927 B
PHP
#! /usr/bin/php5
|
|
<?php
|
|
require "checkup.inc.php";
|
|
require "modules/init.inc.php";
|
|
|
|
$bot = new ircbot("Pb42", "BetaBot", "Insert Bot Name");
|
|
$bot -> 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);
|
|
?>
|