From df8e15b39e394c75fa356e42379289127182a516 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 17 Nov 2016 15:57:48 -0800 Subject: [PATCH] Fix factlog for deleted factoids not in global channel --- PBot/FactoidCommands.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index b4c92afe..6728621b 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -760,7 +760,7 @@ sub factlog { return $usage; } - my $needs_disambig; + my $needs_disambig = 0; if (not defined $trig) { $trig = $chan; @@ -788,7 +788,11 @@ sub factlog { } } } elsif (@factoids and $factoids[0]) { - ($channel, $trigger) = ($factoids[0]->[0], $factoids[0]->[1]); + if ($chan eq '.*') { + ($channel, $trigger) = ($factoids[0]->[0], $factoids[0]->[1]); + } else { + ($channel, $trigger) = ($chan, $trig); + } } else { ($channel, $trigger) = ($chan, $trig); }