mirror of
https://github.com/pragma-/pbot.git
synced 2025-01-11 12:32:37 +01:00
Look for module in global channel before falling back to local channel
This commit is contained in:
parent
4f875f9c4c
commit
aa749860c0
@ -44,8 +44,7 @@ sub execute_module {
|
||||
|
||||
$arguments = "" if not defined $arguments;
|
||||
|
||||
my @factoids = $self->{pbot}->{factoids}->find_factoid($from, $keyword);
|
||||
|
||||
my @factoids = $self->{pbot}->{factoids}->find_factoid($from, $keyword, undef, 2, 2);
|
||||
|
||||
if(not @factoids or not $factoids[0]) {
|
||||
$self->{pbot}->{interpreter}->handle_result($from, $nick, $user, $host, $command, "$keyword $arguments", "/msg $nick Failed to find module for '$keyword' in channel $from\n", 1, 0);
|
||||
|
@ -291,7 +291,7 @@ sub find_factoid {
|
||||
goto NEXT_DEPTH;
|
||||
}
|
||||
|
||||
if ($exact_channel == 1) {
|
||||
if (defined $exact_channel && $exact_channel == 1) {
|
||||
return ($channel, $trigger);
|
||||
} else {
|
||||
push @results, [$channel, $trigger];
|
||||
|
Loading…
Reference in New Issue
Block a user