mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +01:00
Fix cmd_factfind not being found
This commit is contained in:
parent
fb0bfc4c2f
commit
2ec89864bd
@ -55,6 +55,7 @@ sub new {
|
||||
|
||||
sub initialize {
|
||||
my ($self, %conf) = @_;
|
||||
|
||||
$self->{pbot}->{registry}->add_default('text', 'general', 'module_repo', $conf{module_repo}
|
||||
// 'https://github.com/pragma-/pbot/blob/master/modules/');
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ sub interpreter {
|
||||
if ($strictnamespace) { $namespace_regex = "(?:" . (quotemeta $namespace) . '|\\.\\*)'; }
|
||||
|
||||
$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
|
||||
if ($matches !~ m/^No factoids/) {
|
||||
|
@ -33,7 +33,7 @@ sub add_handlers {
|
||||
|
||||
# send these events to on_init()
|
||||
$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
|
||||
$self->{pbot}->{conn}->add_handler(
|
||||
|
@ -50,7 +50,7 @@ sub load_packages {
|
||||
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);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user