aboutsummaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-11-13 01:35:54 +0100
committerest31 <MTest31@outlook.com>2015-11-13 02:35:02 +0100
commit657a16d90c42afc212e70c594296b1e204545a4c (patch)
tree3c244b11f64bddb513a9e13bcce1c84996046811 /src/network
parent36855522a5382614c525c69dd884560a197b875d (diff)
downloadminetest-657a16d90c42afc212e70c594296b1e204545a4c.tar.gz
minetest-657a16d90c42afc212e70c594296b1e204545a4c.tar.bz2
minetest-657a16d90c42afc212e70c594296b1e204545a4c.zip
Only allow players with shout to chat
Fix regression of commit 5e507c9829942c434a6f1ae7a4f3a488c7e50bef "Add server side ncurses terminal" which allowed all players, even those without a shout priv, to chat. Fixes #3362.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/serverpackethandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index 3c446e31d..a4fa502ae 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -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);