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:
parent
2942a44fd8
commit
6d0cd3ef07
@ -48,13 +48,14 @@ sub autoload {
|
|||||||
return if $self->{pbot}->{registry}->get_value('plugins', 'noautoload');
|
return if $self->{pbot}->{registry}->get_value('plugins', 'noautoload');
|
||||||
|
|
||||||
my $path = $self->{pbot}->{registry}->get_value('general', 'plugin_dir') // 'Plugins';
|
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");
|
$self->{pbot}->{logger}->log("Loading plugins ...\n");
|
||||||
my $plugin_count = 0;
|
my $plugin_count = 0;
|
||||||
|
|
||||||
my $fh;
|
my $fh;
|
||||||
if (not open $fh, "<$path/autoload") {
|
if (not open $fh, "<$data_dir/plugin_autoload") {
|
||||||
$self->{pbot}->{logger}->log("warning: file $path/autoload does not exist; skipping autoloading of Plugins\n");
|
$self->{pbot}->{logger}->log("warning: file $data_dir/plugin_autoload does not exist; skipping autoloading of Plugins\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user