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:
parent
17e78cd7fc
commit
1c5dc69047
@ -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");
|
||||
|
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user