From 74e0f9a1cef9226f32711e103fd5424935d44e61 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 18 May 2020 09:54:55 -0700 Subject: [PATCH] Plugins: ignore blank lines in plugin_autoload --- PBot/Plugins.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PBot/Plugins.pm b/PBot/Plugins.pm index 10e196d8..ee588438 100644 --- a/PBot/Plugins.pm +++ b/PBot/Plugins.pm @@ -89,12 +89,12 @@ sub autoload { close $fh; foreach my $plugin (sort @plugins) { - $plugin = basename $plugin; - $plugin =~ s/.pm$//; - # do not load plugins that begin with a comment next if $plugin =~ m/^\s*#/; + next if not length $plugin; + $plugin = basename $plugin; + $plugin =~ s/.pm$//; $plugin_count++ if $self->load($plugin, %conf); } $self->{pbot}->{logger}->log("$plugin_count plugin" . ($plugin_count == 1 ? '' : 's') . " loaded.\n");