mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-28 05:33:46 -08:00
apply chat flood prevention in games next to rooms (#4387)
* apply chat flood prevention in games next to rooms * add limit to private messages as well
This commit is contained in:
@@ -945,6 +945,9 @@ Server_Player::cmdGameSay(const Command_GameSay &cmd, ResponseContainer & /*rc*/
|
||||
}
|
||||
}
|
||||
|
||||
if (!userInterface->addSaidMessageSize(cmd.message().size())) {
|
||||
return Response::RespChatFlood;
|
||||
}
|
||||
Event_GameSay event;
|
||||
event.set_message(cmd.message());
|
||||
ges.enqueueGameEvent(event, playerId);
|
||||
|
||||
Reference in New Issue
Block a user