From 4b76dbf23769064b679a08dea2b3930ed7fea096 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 26 May 2021 21:42:01 -0700 Subject: [PATCH] strictnamespace is now more strict --- PBot/Factoids.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index e52f31e2..5834fae5 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -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}] " : "";