From 17a62b48e47e624393866094a7c0c88e4c900e51 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 24 Aug 2017 15:16:42 -0700 Subject: [PATCH] Limit truncation pastes to 8000 bytes --- PBot/Interpreter.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index 62374fae..6b071aa4 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -241,6 +241,7 @@ sub truncate_result { if(length $result > $max_msg_len) { my $link; if($paste) { + $original_result = substr $original_result, 0, 8000; $link = $self->paste("[" . (defined $from ? $from : "stdin") . "] <$nick> $text\n\n$original_result"); } else { $link = 'undef';