From 63fc728a84a5ba97240233ad1c5d94f1ade2deb1 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 24 Jun 2021 18:21:19 +0000 Subject: Require 'basic_debug' priv to view gameplay-relevant debug info, require 'debug' priv to view wireframe (#9315) Fixes #7245. --- src/network/clientpackethandler.cpp | 5 +++++ src/network/networkprotocol.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src/network') diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index c8a160732..b86bdac18 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -896,6 +896,11 @@ void Client::handleCommand_Privileges(NetworkPacket* pkt) m_privileges.insert(priv); infostream << priv << " "; } + + // Enable basic_debug on server versions before it was added + if (m_proto_ver < 40) + m_privileges.insert("basic_debug"); + infostream << std::endl; } diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 838bf0b2c..b647aab1a 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -205,9 +205,11 @@ with this program; if not, write to the Free Software Foundation, Inc., Updated set_sky packet Adds new sun, moon and stars packets Minimap modes + PROTOCOL VERSION 40: + Added 'basic_debug' privilege */ -#define LATEST_PROTOCOL_VERSION 39 +#define LATEST_PROTOCOL_VERSION 40 #define LATEST_PROTOCOL_VERSION_STRING TOSTRING(LATEST_PROTOCOL_VERSION) // Server's supported network protocol range -- cgit v1.2.3