mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 12:12:34 +01:00
Plugins: fix default loading path
This commit is contained in:
parent
9f065a510d
commit
d681f88f23
@ -74,7 +74,7 @@ sub load {
|
|||||||
|
|
||||||
return if $self->{pbot}->{registry}->get_value('plugins', 'disabled');
|
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) {
|
if (not grep { $_ eq $path } @INC) {
|
||||||
unshift @INC, $path;
|
unshift @INC, $path;
|
||||||
@ -123,7 +123,7 @@ sub unload {
|
|||||||
$self->{pbot}->{logger}->log("Warning: got error unloading plugin $plugin: $@\n");
|
$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;
|
my $class = $path;
|
||||||
$class =~ s,[/\\],::,g;
|
$class =~ s,[/\\],::,g;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user