3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Fix cmd_factfind not being found

This commit is contained in:
Pragmatic Software 2021-07-21 10:49:38 -07:00
parent fb0bfc4c2f
commit 2ec89864bd
4 changed files with 4 additions and 3 deletions

View File

@ -55,6 +55,7 @@ sub new {
sub initialize { sub initialize {
my ($self, %conf) = @_; my ($self, %conf) = @_;
$self->{pbot}->{registry}->add_default('text', 'general', 'module_repo', $conf{module_repo} $self->{pbot}->{registry}->add_default('text', 'general', 'module_repo', $conf{module_repo}
// 'https://github.com/pragma-/pbot/blob/master/modules/'); // 'https://github.com/pragma-/pbot/blob/master/modules/');

View File

@ -1166,7 +1166,7 @@ sub interpreter {
if ($strictnamespace) { $namespace_regex = "(?:" . (quotemeta $namespace) . '|\\.\\*)'; } if ($strictnamespace) { $namespace_regex = "(?:" . (quotemeta $namespace) . '|\\.\\*)'; }
$context->{arguments} = quotemeta($original_keyword) . " -channel $namespace_regex"; $context->{arguments} = quotemeta($original_keyword) . " -channel $namespace_regex";
my $matches = $self->{commands}->cmd_factfind($context); my $matches = $self->{pbot}->{commands}->{packages}->{Factoids}->cmd_factfind($context);
# found factfind matches # found factfind matches
if ($matches !~ m/^No factoids/) { if ($matches !~ m/^No factoids/) {

View File

@ -33,7 +33,7 @@ sub add_handlers {
# send these events to on_init() # send these events to on_init()
$self->{pbot}->{conn}->add_handler([251, 252, 253, 254, 255, 302], $self->{pbot}->{conn}->add_handler([251, 252, 253, 254, 255, 302],
sub { $self->{irchandlers}->{Server}->on_init(@_) }); sub { $self->{packages}->{Server}->on_init(@_) });
# ignore these events # ignore these events
$self->{pbot}->{conn}->add_handler( $self->{pbot}->{conn}->add_handler(

View File

@ -50,7 +50,7 @@ sub load_packages {
return 0; return 0;
} }
$self->{lc $directory}->{$name} = $class->new(pbot => $self->{pbot}); $self->{packages}->{$name} = $class->new(pbot => $self->{pbot});
$self->{pbot}->{refresher}->{refresher}->update_cache($package); $self->{pbot}->{refresher}->{refresher}->update_cache($package);
}; };