From c9b69e0b50ae19c37847e8fb4c1d7d418f18d4a2 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 4 May 2020 23:37:13 -0700 Subject: [PATCH] Interpreter: ensure $context->{hostmask} is set in interpret() --- PBot/Interpreter.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index c057370d..1e6c26ec 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -170,6 +170,10 @@ sub interpret { my $text; my $pbot = $self->{pbot}; + if (not exists $context->{hostmask}) { + $context->{hostmask} = "$context->{nick}!$context->{user}\@$context->{host}"; + } + $context->{interpret_depth}++; $pbot->{logger}->log("=== [$context->{interpret_depth}] Got command: ("