3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

Plugins: fix default loading path

This commit is contained in:
Pragmatic Software 2019-12-15 14:41:25 -08:00
parent 9f065a510d
commit d681f88f23

View File

@ -74,7 +74,7 @@ sub load {
return if $self->{pbot}->{registry}->get_value('plugins', 'disabled');
my $path = $self->{pbot}->{registry}->get_value('plugins', 'path') // 'PBot/Plugins';
my $path = $self->{pbot}->{registry}->get_value('plugins', 'path') // 'Plugins';
if (not grep { $_ eq $path } @INC) {
unshift @INC, $path;
@ -123,7 +123,7 @@ sub unload {
$self->{pbot}->{logger}->log("Warning: got error unloading plugin $plugin: $@\n");
}
my $path = $self->{pbot}->{registry}->get_value('plugins', 'path') // 'PBot/Plugins';
my $path = $self->{pbot}->{registry}->get_value('plugins', 'path') // 'Plugins';
my $class = $path;
$class =~ s,[/\\],::,g;