Fixed a bug where players who flooded the lobby would never get reset.
This commit is contained in:
parent
23d4a0b0d0
commit
3020a9ed1b
3 changed files with 1 additions and 5 deletions
|
@ -92,7 +92,7 @@ bool wesnothd::player::is_message_flooding()
|
|||
if (now - flood_start_ > TimePeriod) {
|
||||
messages_since_flood_start_ = 0;
|
||||
flood_start_ = now;
|
||||
} else if (messages_since_flood_start_ == MaxMessages) {
|
||||
} else if (messages_since_flood_start_ >= MaxMessages) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -54,7 +54,6 @@ public:
|
|||
|
||||
const simple_wml::node* config_address() const { return &cfg_; }
|
||||
|
||||
bool silenced() const { return messages_since_flood_start_ > MaxMessages; }
|
||||
bool is_message_flooding();
|
||||
|
||||
/**
|
||||
|
|
|
@ -355,9 +355,6 @@ void room_manager::unstore_player_rooms(const player_map::iterator user)
|
|||
|
||||
void room_manager::process_message(simple_wml::document &data, const player_map::iterator user)
|
||||
{
|
||||
if (user->second.silenced()) {
|
||||
return;
|
||||
}
|
||||
simple_wml::node* const message = data.root().child("message");
|
||||
assert (message);
|
||||
message->set_attr_dup("sender", user->second.name().c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue