mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Only allow players with shout to chat
Fix regression of commit
5e507c9829
"Add server side ncurses terminal"
which allowed all players, even those without a shout priv, to chat.
Fixes #3362.
This commit is contained in:
parent
36855522a5
commit
657a16d90c
3 changed files with 14 additions and 6 deletions
|
@ -1063,7 +1063,8 @@ void Server::handleCommand_ChatMessage(NetworkPacket* pkt)
|
|||
std::string name = player->getName();
|
||||
std::wstring wname = narrow_to_wide(name);
|
||||
|
||||
std::wstring answer_to_sender = handleChat(name, wname, message, pkt->getPeerId());
|
||||
std::wstring answer_to_sender = handleChat(name, wname, message,
|
||||
true, pkt->getPeerId());
|
||||
if (!answer_to_sender.empty()) {
|
||||
// Send the answer to sender
|
||||
SendChatMessage(pkt->getPeerId(), answer_to_sender);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue