]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Don't show privileged commands to unprivileged users in COMMANDS.
authorSadie Powell <sadie@witchery.services>
Thu, 7 May 2020 12:02:42 +0000 (13:02 +0100)
committerSadie Powell <sadie@witchery.services>
Thu, 7 May 2020 12:03:00 +0000 (13:03 +0100)
src/coremods/core_info/cmd_commands.cpp

index ae79ac2960623de8f03b8cb773958bfd99587c06..162be5243512559a948d451cc1893379e3f582d9 100644 (file)
@@ -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;