aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IdaliusConfig.pm2
-rw-r--r--bot.conf.example1
-rwxr-xr-xidalius.pl4
3 files changed, 6 insertions, 1 deletions
diff --git a/IdaliusConfig.pm b/IdaliusConfig.pm
index 03adb11..642d408 100644
--- a/IdaliusConfig.pm
+++ b/IdaliusConfig.pm
@@ -47,7 +47,7 @@ sub check_config
my ($config) = @_;
# Lists of mandatory config variables
- my @scalars = qw/nick username ircname server port usessl sslcert sslkey user group prefix_nick prefix/;
+ my @scalars = qw/nick username ircname server port usessl sslcert sslkey user group prefix_nick prefix log_debug/;
my @lists = qw/plugins channels ignore/;
foreach my $name (@scalars) {
diff --git a/bot.conf.example b/bot.conf.example
index 34cbf45..143ad4c 100644
--- a/bot.conf.example
+++ b/bot.conf.example
@@ -14,6 +14,7 @@ user = nobody
group = nobody
prefix_nick = 1
prefix = %
+log_debug = 0
[Plugin::Admin]
admins = [ snargle!~kleg@glarg.example.com ]
diff --git a/idalius.pl b/idalius.pl
index 7e2e775..d19087d 100755
--- a/idalius.pl
+++ b/idalius.pl
@@ -348,6 +348,10 @@ sub irc_delay_removed {
sub _default {
my ($event, $args) = @_[ARG0 .. $#_];
+
+ # exit early unless in debug mode
+ return unless $config->{_}->{log_debug};
+
my @output = ( "$event: " );
for my $arg (@$args) {