bring back chat spam kick

This commit is contained in:
sylvessa 2026-04-13 21:30:30 -05:00
parent 1fafeb3baa
commit 706afb70d4

View file

@ -926,13 +926,14 @@ void PlayerConnection::handleChat(shared_ptr<ChatPacket> packet)
}
#else
wstring formatted = L"<" + player->name + L"> " + message;
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(app.FormatChatMessage(formatted, false))));
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(app.FormatChatMessage(formatted, false))));
#endif
chatSpamTickCount += SharedConstants::TICKS_PER_SECOND;
if (chatSpamTickCount > SharedConstants::TICKS_PER_SECOND * 10)
{
disconnect(DisconnectPacket::eDisconnect_None); // spam
}
#endif
}
void PlayerConnection::handleCommand(const wstring& message)