3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-23 04:19:27 +01:00

Interpreter: subtract IRC command length from truncation length

This commit is contained in:
Pragmatic Software 2020-02-19 15:07:25 -08:00
parent bf7979a4f1
commit 108f61d40e

View File

@ -706,6 +706,7 @@ sub lc_args {
sub truncate_result {
my ($self, $from, $nick, $text, $original_result, $result, $paste) = @_;
my $max_msg_len = $self->{pbot}->{registry}->get_value('irc', 'max_msg_len');
$max_msg_len -= length "PRIVMSG $from :";
utf8::encode $result;
utf8::encode $original_result;