patch #1153: fix for bug #13302

- truncate chatlog to 256 messages instead of 1024 from cornmander
  (Gregory Shikhman)
This commit is contained in:
Gunter Labes 2009-04-03 07:48:18 +00:00
parent 3d61d03ea8
commit f33700c70a

View File

@ -33,6 +33,8 @@
#define LOG_NW LOG_STREAM(info, network)
#define ERR_NW LOG_STREAM(err, network)
#define MAX_MESSAGES 256
namespace {
class user_menu_style : public gui::menu::imgsel_style {
@ -203,7 +205,7 @@ void chat::add_message(const time_t& time, const std::string& user,
{
message_history_.push_back(msg(time, user, message));
while (message_history_.size() > 1024) {
while (message_history_.size() > MAX_MESSAGES) {
message_history_.pop_front();
if (last_update_ > 0)