From: Sadie Powell Date: Thu, 7 May 2020 12:02:42 +0000 (+0100) Subject: Don't show privileged commands to unprivileged users in COMMANDS. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=b4e90c68945c6d5a81da0d6355517f8f940bd5e5;p=user%2Fhenk%2Fcode%2Finspircd.git Don't show privileged commands to unprivileged users in COMMANDS. --- 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;