diff --git a/lib/PBot/Core/Interpreter.pm b/lib/PBot/Core/Interpreter.pm index ea2b5b76..3579770c 100644 --- a/lib/PBot/Core/Interpreter.pm +++ b/lib/PBot/Core/Interpreter.pm @@ -343,6 +343,9 @@ sub interpret($self, $context) { } } + # strip any trailing newlines from keyword + $keyword =~ s/\n+$//; + # ensure we have a $keyword if (not defined $keyword or not length $keyword) { $self->{pbot}->{logger}->log("Error: Missing keyword; disregarding command\n"); @@ -709,7 +712,7 @@ sub handle_result($self, $context, $result = $context->{result}) { my $link = $self->{pbot}->{webpaste}->paste("$context->{from} <$context->{nick}> $context->{text}\n\n$original_result"); - my $message = "And that's all I have to say about that. See $link for full text."; + my $message = ""; if ($context->{use_output_queue}) { my $message = { @@ -1276,9 +1279,14 @@ sub split_line($self, $line, %opts) { $token .= $ch; next; } else { + if ($opts{keep_spaces} && $ch eq "\n") { + $token .= $ch; + } + unless ($opts{strip_commas} and $token eq ',') { push @args, $token if length $token; } + $token = ''; next; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 645c820b..76fea7e5 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4817, + BUILD_REVISION => 4818, BUILD_DATE => "2024-10-30", };