mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 03:25:21 +00:00
- truncate chatlog to 256 messages instead of 1024 from cornmander (Gregory Shikhman)
This commit is contained in:
parent
3d61d03ea8
commit
f33700c70a
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user