3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

strictnamespace is now more strict

This commit is contained in:
Pragmatic Software 2021-05-26 21:42:01 -07:00
parent 520cce7ea8
commit 4b76dbf237

View File

@ -1097,12 +1097,14 @@ sub interpreter {
my @chanlist = ();
my ($fwd_chan, $fwd_trig);
# build list of which channels contain the keyword, keeping track of the last one and count
foreach my $factoid ($self->{factoids}->get_all("index2 = $original_keyword", 'index1', 'type')) {
next if $factoid->{type} ne 'text' and $factoid->{type} ne 'module';
push @chanlist, $self->{factoids}->get_data($factoid->{index1}, '_name');
$fwd_chan = $factoid->{index1};
$fwd_trig = $original_keyword;
unless ($strictnamespace) {
# build list of which channels contain the keyword, keeping track of the last one and count
foreach my $factoid ($self->{factoids}->get_all("index2 = $original_keyword", 'index1', 'type')) {
next if $factoid->{type} ne 'text' and $factoid->{type} ne 'module';
push @chanlist, $self->{factoids}->get_data($factoid->{index1}, '_name');
$fwd_chan = $factoid->{index1};
$fwd_trig = $original_keyword;
}
}
my $ref_from = $context->{ref_from} ? "[$context->{ref_from}] " : "";