3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-30 07:59:42 +01:00

Truncate all messages beyond MAX_NICK_MESSAGES

This commit is contained in:
Pragmatic Software 2014-05-05 05:18:59 +00:00
parent af447c2614
commit 2c2b2c2e4b
2 changed files with 3 additions and 3 deletions

View File

@ -224,7 +224,7 @@ sub add_message {
}
# keep only MAX_NICK_MESSAGES message history per channel
if($length >= $self->{pbot}->{MAX_NICK_MESSAGES}) {
while($length >= $self->{pbot}->{MAX_NICK_MESSAGES}) {
my %msg = %{ shift(@{ $self->message_history->{$account}->{channels}->{$channel}{messages} }) };
#$self->{pbot}->logger->log("shifting message off top: $msg{msg}, $msg{timestamp}\n");
$length--;

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 564,
BUILD_DATE => "2014-05-01",
BUILD_REVISION => 565,
BUILD_DATE => "2014-05-04",
};
1;