Example #1
0
require_once "cls/botzilla.class.php";
// server info
$bot_config = array('server' => "irc.freenode.net", 'port' => "6667", 'nick' => "mybot", 'realname' => "mybot", 'hostname' => 'yourhost', 'servername' => 'yourserver', 'diss' => true);
// channels to join after it connects.
$channels = array('#botzilla');
// if your nick is registered, give the passwd here.
//$nick_passwd = 'irc_passwd';
// instantiate bot class
$botzilla = new botzilla($bot_config);
// turn logging on (off by default)
$botzilla->logging(true);
// nicks that have a higher level of access (to functions like QUIT)
$owners = array('yournick', 'anothernick');
// your nick(s) here
// set owners
$botzilla->setOwner($owners);
/** "ziggis", ( the command plugins in ziggi/ ) get added here.
You can add singulars with addZiggi(), but addZiggis() is basically the same thing in bulk.
Items added with no additional params, or are added as strings instead of arrays, assume that the user permission
set as BZUSER_DEFAULT, which I keep at BZUSER_REGISTERED.

# no params
addZiggi('somefile.class.php');

To set a repeating event at a regular interval, add a 'cron' item to the parameters array:

# your_command each hour
addZiggi('your.class.php' , array
(
	'access'=>BZUSER_REGISTERED,
	'cron'=>array