diff options
| -rw-r--r-- | Plugin/Antiflood.pm (renamed from plugin/antiflood.pm) | 2 | ||||
| -rw-r--r-- | Plugin/Map.pm (renamed from plugin/map.pm) | 2 | ||||
| -rw-r--r-- | Plugin/Timezone.pm (renamed from plugin/timezone.pm) | 2 | ||||
| -rw-r--r-- | Plugin/Tittilate.pm (renamed from plugin/tittilate.pm) | 2 | ||||
| -rw-r--r-- | Plugin/URL_Title.pm (renamed from plugin/url_title.pm) | 2 | ||||
| -rwxr-xr-x | idalius.pl | 15 | 
6 files changed, 12 insertions, 13 deletions
diff --git a/plugin/antiflood.pm b/Plugin/Antiflood.pm index a44c07c..4db7ace 100644 --- a/plugin/antiflood.pm +++ b/Plugin/Antiflood.pm @@ -1,6 +1,6 @@  #!/usr/bin/env perl -package plugin::antiflood; +package Plugin::Antiflood;  use strict;  use warnings; diff --git a/plugin/map.pm b/Plugin/Map.pm index f8cb256..9ca8cef 100644 --- a/plugin/map.pm +++ b/Plugin/Map.pm @@ -1,6 +1,6 @@  #!/usr/bin/env perl -package plugin::map; +package Plugin::Map;  use strict;  use warnings; diff --git a/plugin/timezone.pm b/Plugin/Timezone.pm index 8807d54..eaea907 100644 --- a/plugin/timezone.pm +++ b/Plugin/Timezone.pm @@ -1,6 +1,6 @@  #!/usr/bin/env perl -package plugin::timezone; +package Plugin::Timezone;  use strict;  use warnings; diff --git a/plugin/tittilate.pm b/Plugin/Tittilate.pm index 4df6b07..b2c2286 100644 --- a/plugin/tittilate.pm +++ b/Plugin/Tittilate.pm @@ -1,6 +1,6 @@  #!/usr/bin/env perl -package plugin::tittilate; +package Plugin::Tittilate;  use strict;  use warnings; diff --git a/plugin/url_title.pm b/Plugin/URL_Title.pm index 32995fd..495df8e 100644 --- a/plugin/url_title.pm +++ b/Plugin/URL_Title.pm @@ -1,6 +1,6 @@  #!/usr/bin/env perl -package plugin::url_title; +package Plugin::URL_Title;  use strict;  use warnings; @@ -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.  | 
