bring back chat spam kick
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user