mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Server: Ignore whitespace-only chat messages
This commit is contained in:
parent
b5c09ada79
commit
a8b7c8ff38
@ -3001,6 +3001,9 @@ std::wstring Server::handleChat(const std::string &name,
|
||||
}
|
||||
|
||||
auto message = trim(wide_to_utf8(wmessage));
|
||||
if (message.empty())
|
||||
return L"";
|
||||
|
||||
if (message.find_first_of("\n\r") != std::wstring::npos) {
|
||||
return L"Newlines are not permitted in chat messages";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user