From d1df2d325c5b965f60a49c1af82f4627a91b3c5e Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 12 Aug 2021 22:30:56 -0700 Subject: [PATCH] Improve output of truncation text Instead of "... [truncated; see http://xxx for full text.]" it more concisely says "... ". Increased irc.max_msg_len from a very conservative 425 to a more generous 460. If you have very long channel names or nicknames, or if you see things being truncated incorrectly, reduce this value. --- data/registry | 2 +- lib/PBot/Core/Interpreter.pm | 8 ++++---- lib/PBot/Core/Registry.pm | 2 +- lib/PBot/VERSION.pm | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/registry b/data/registry index 3e19ecee..2b656f60 100644 --- a/data/registry +++ b/data/registry @@ -284,7 +284,7 @@ }, "max_msg_len" : { "type" : "text", - "value" : "425" + "value" : "460" }, "port" : { "type" : "text", diff --git a/lib/PBot/Core/Interpreter.pm b/lib/PBot/Core/Interpreter.pm index d6fee0cd..b603eac1 100644 --- a/lib/PBot/Core/Interpreter.pm +++ b/lib/PBot/Core/Interpreter.pm @@ -770,17 +770,17 @@ sub truncate_result { $paste_result = $self->{pbot}->{webpaste}->paste("$context->{from} <$context->{nick}> $context->{text}\n\n$paste_text"); } - my $trunc = '... [truncated'; + my $trunc = '... add_default('text', 'irc', 'debug', $conf{irc_debug} // 0); $self->add_default('text', 'irc', 'show_motd', $conf{show_motd} // 1); - $self->add_default('text', 'irc', 'max_msg_len', $conf{max_msg_len} // 425); + $self->add_default('text', 'irc', 'max_msg_len', $conf{max_msg_len} // 460); $self->add_default('text', 'irc', 'server', $conf{server} // "irc.libera.chat"); $self->add_default('text', 'irc', 'port', $conf{port} // 6667); $self->add_default('text', 'irc', 'sasl', $conf{SASL} // 0); diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 73e2a4b2..aee49e50 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4349, - BUILD_DATE => "2021-08-06", + BUILD_REVISION => 4352, + BUILD_DATE => "2021-08-12", }; sub initialize {}