mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Interpreter: subtract IRC command length from truncation length
This commit is contained in:
parent
bf7979a4f1
commit
108f61d40e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user