From 3a3ed381623ac7633b74a89fc7a03703d054f2ee Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 30 Apr 2020 11:48:53 -0700 Subject: [PATCH] MessageHistory: correct behavior of `recall -n` without history --- PBot/MessageHistory.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PBot/MessageHistory.pm b/PBot/MessageHistory.pm index 87f9540c..06793f6b 100644 --- a/PBot/MessageHistory.pm +++ b/PBot/MessageHistory.pm @@ -246,8 +246,8 @@ sub recall_message { # imply -x if -n > 1 and no history and -x isn't already set to somebody if ($recall_count > 1 and not defined $recall_history and not defined $recall_context) { $recall_context = $recall_nick; } - # make -n behave like -b if -n > 1 and nick is context - if ((defined $recall_context and not defined $recall_history) and $recall_count > 1) { + # make -n behave like -b if -n > 1 and no history is specified + if (not defined $recall_history and $recall_count > 1) { $recall_before = $recall_count - 1; $recall_count = 0; }