diff options
Diffstat (limited to 'idalius.pl')
-rwxr-xr-x | idalius.pl | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -9,7 +9,7 @@ use POE::Component::IRC; use POE::Component::IRC::Plugin::NickServID; use config_file; use IRC::Utils qw(strip_color strip_formatting); -use Module::Pluggable search_path => "plugin", instantiate => 'configure'; +use Module::Pluggable search_path => "Plugin", instantiate => 'configure'; my $config_file = "bot.conf"; my %config = config_file::parse_config($config_file); @@ -69,11 +69,16 @@ drop_priv(); $poe_kernel->run(); +sub log_info { + # FIXME direct to a log file instead of stdout + my $stamp = strftime("%Y-%m-%d %H:%M:%S %z", localtime); + print "$stamp | @_\n"; +} # Register a command name to a certain sub sub register_command { my ($command, $action) = @_; - print ("registering $command to $action\n"); + log_info "Registering command: $command"; $commands{$command} = $action; } @@ -100,12 +105,6 @@ sub drop_priv { setuid($config{uid}) or die "Failed to setuid: $!\n"; } -sub log_info { - # FIXME direct to a log file instead of stdout - my $stamp = strftime("%Y-%m-%d %H:%M:%S %z", localtime); - print "$stamp | @_\n"; -} - # Add a strike against a nick for module flood protection # This differs from antiflood.pm in that it is used only for when users have # triggered a response from the bot. |