No description
- Perl 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| etc | ||
| init | ||
| lib | ||
| t | ||
| .gitignore | ||
| Changes | ||
| Makefile.PL | ||
| README | ||
NAME
Botman - An IRC bot
DESCRIPTION
This module extends Bot::BasicBot::Pluggable.
SYNOPSIS
EVENTS
irc_mode_state
yield(irc_mode_state => $nick, $channel, $mode, @ops);
Called when one or more users change mode. This event will dispatch
"mode_change", with this data:
{
who => $str, # who got new mode
channel => $str, # in which channel
added => $bool, # + = true, - = false
op => $bool,
voice => $bool,
}
This method also calls Bot::BasicBot::irc_mode_state() - or whatever
"irc_mode_state()" exists in super class.
METHODS
new
$self = $class->new(\%args);
$self = $class->new(%args);
$self = $class->new($config_file);
logging
$self->logging(\%config);
$self->logging(\$str);
$self->logging($config_file);
This is triggered by "new()". It will set up Log::Log4perl and log
STDERR with level "warn", and to the "Botman.STDERR" logger.
modules
@modules = $self->modules(@modules);
@modules = $self->modules(\@modules);
@modules = $self->modules;
Returns a list of the names of all loaded modules as an array. Setting
this attribute, will cause the modules to be loaded.
This should be triggered by Bot::BasicBot::new().
get_module
$obj = $self->get_module($name);
Returns the instance of the module with name $name.
mode
$self->mode({ mode => $str, who => $str, channel => $str });
This method can change the mode of a user.
names
$self->names({
channel => $channel,
names => {
$nick => {
op => $bool,
voice => $bool,
},
# ...
},
});
This method will dispatch to "names", with the same arguments as this
method was called with.
logf
$self->logf($level, $format, @args);
log
$self->log(@messages);
LICENSE
Copyright 2007 Jan Henning Thorsen, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
AUTHOR
Jan Henning Thorsen, "<jhthorsen at cpan.org>"