mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Plugins: ignore blank lines in plugin_autoload
This commit is contained in:
parent
b0bdde34a5
commit
74e0f9a1ce
@ -89,12 +89,12 @@ sub autoload {
|
|||||||
close $fh;
|
close $fh;
|
||||||
|
|
||||||
foreach my $plugin (sort @plugins) {
|
foreach my $plugin (sort @plugins) {
|
||||||
$plugin = basename $plugin;
|
|
||||||
$plugin =~ s/.pm$//;
|
|
||||||
|
|
||||||
# do not load plugins that begin with a comment
|
# do not load plugins that begin with a comment
|
||||||
next if $plugin =~ m/^\s*#/;
|
next if $plugin =~ m/^\s*#/;
|
||||||
|
next if not length $plugin;
|
||||||
|
|
||||||
|
$plugin = basename $plugin;
|
||||||
|
$plugin =~ s/.pm$//;
|
||||||
$plugin_count++ if $self->load($plugin, %conf);
|
$plugin_count++ if $self->load($plugin, %conf);
|
||||||
}
|
}
|
||||||
$self->{pbot}->{logger}->log("$plugin_count plugin" . ($plugin_count == 1 ? '' : 's') . " loaded.\n");
|
$self->{pbot}->{logger}->log("$plugin_count plugin" . ($plugin_count == 1 ? '' : 's') . " loaded.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user