mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 14:53:45 +01:00
Fix crash regression when chatting in the ncurses console
Fixes #4579, a regression introduced by commit d4c76258e37337ea585cf24d8e05b50a30fa307d "Chat: new settings to prevent spam"
This commit is contained in:
parent
61d1751dff
commit
de83c29ba0
@ -2751,6 +2751,7 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna
|
||||
if (ate)
|
||||
return L"";
|
||||
|
||||
if (player) {
|
||||
switch (player->canSendChatMessage()) {
|
||||
case RPLAYER_CHATRESULT_FLOODING: {
|
||||
std::wstringstream ws;
|
||||
@ -2765,6 +2766,7 @@ std::wstring Server::handleChat(const std::string &name, const std::wstring &wna
|
||||
case RPLAYER_CHATRESULT_OK: break;
|
||||
default: FATAL_ERROR("Unhandled chat filtering result found.");
|
||||
}
|
||||
}
|
||||
|
||||
if (m_max_chatmessage_length > 0 && wmessage.length() > m_max_chatmessage_length) {
|
||||
return L"Your message exceed the maximum chat message limit set on the server. "
|
||||
|
Loading…
Reference in New Issue
Block a user