From b4e90c68945c6d5a81da0d6355517f8f940bd5e5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 7 May 2020 13:02:42 +0100 Subject: [PATCH] Don't show privileged commands to unprivileged users in COMMANDS. --- src/coremods/core_info/cmd_commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coremods/core_info/cmd_commands.cpp b/src/coremods/core_info/cmd_commands.cpp index ae79ac296..162be5243 100644 --- a/src/coremods/core_info/cmd_commands.cpp +++ b/src/coremods/core_info/cmd_commands.cpp @@ -48,8 +48,8 @@ CmdResult CommandCommands::Handle(User* user, const Params& parameters) list.reserve(commands.size()); for (CommandParser::CommandMap::const_iterator i = commands.begin(); i != commands.end(); ++i) { - // Don't show S2S commands to users - if (i->second->flags_needed == FLAG_SERVERONLY) + // Don't show privileged commands to users without the privilege. + if (i->second->flags_needed && user->IsModeSet(i->second->flags_needed)) continue; Module* src = i->second->creator; -- 2.39.5