summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-05-07 13:02:42 +0100
committerSadie Powell <sadie@witchery.services>2020-05-07 13:03:00 +0100
commitb4e90c68945c6d5a81da0d6355517f8f940bd5e5 (patch)
tree3f3f6d440fa2661e3501a39754e53123b490a388 /src
parent7d597daf0483f3396aca61f1f6f927cf81214ea5 (diff)
Don't show privileged commands to unprivileged users in COMMANDS.
Diffstat (limited to 'src')
-rw-r--r--src/coremods/core_info/cmd_commands.cpp4
1 files 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;