3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 11:12:42 +01:00

Plugins: die if plugin fails to autoload during start-up

This commit is contained in:
Pragmatic Software 2021-07-31 12:05:48 -07:00
parent 17e78cd7fc
commit 1c5dc69047
2 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,11 @@ sub autoload {
$self->{pbot}->{logger}->log(" $plugin\n");
$plugin_count++ if $self->load($plugin, %conf);
if ($self->load($plugin, %conf)) {
$plugin_count++
} else {
die "Plugin $plugin failed to autoload. You may remove it from $data_dir/plugin_autoload.\n";
}
}
$self->{pbot}->{logger}->log("$plugin_count plugin" . ($plugin_count == 1 ? '' : 's') . " loaded.\n");

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4331,
BUILD_REVISION => 4332,
BUILD_DATE => "2021-07-31",
};