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

Plugins: move Plugins/autoload to data/plugin_autoload

This commit is contained in:
Pragmatic Software 2019-12-28 22:18:32 -08:00
parent 2942a44fd8
commit 6d0cd3ef07
2 changed files with 3 additions and 2 deletions

View File

@ -48,13 +48,14 @@ sub autoload {
return if $self->{pbot}->{registry}->get_value('plugins', 'noautoload');
my $path = $self->{pbot}->{registry}->get_value('general', 'plugin_dir') // 'Plugins';
my $data_dir = $self->{pbot}->{registry}->get_value('general', 'data_dir');
$self->{pbot}->{logger}->log("Loading plugins ...\n");
my $plugin_count = 0;
my $fh;
if (not open $fh, "<$path/autoload") {
$self->{pbot}->{logger}->log("warning: file $path/autoload does not exist; skipping autoloading of Plugins\n");
if (not open $fh, "<$data_dir/plugin_autoload") {
$self->{pbot}->{logger}->log("warning: file $data_dir/plugin_autoload does not exist; skipping autoloading of Plugins\n");
return;
}