summaryrefslogtreecommitdiff
path: root/src/core/os_help.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-07-10 22:50:18 -0400
committerAdam <Adam@anope.org>2010-07-10 22:50:18 -0400
commit63d71424650ac697f2e698c1c8fd242729691a0f (patch)
tree9c55ed88e580056540f9c728590a50cca7b39404 /src/core/os_help.cpp
parenta49521302628982f62ddadd997a81734f4d8c84f (diff)
Added options:hideprivilegedcommands config option to hide privileged commands from normal users
Diffstat (limited to 'src/core/os_help.cpp')
-rw-r--r--src/core/os_help.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/os_help.cpp b/src/core/os_help.cpp
index 9ddeda66e..d88119bd2 100644
--- a/src/core/os_help.cpp
+++ b/src/core/os_help.cpp
@@ -30,7 +30,8 @@ class CommandOSHelp : public Command
{
notice_help(Config.s_OperServ, u, OPER_HELP);
for (CommandMap::const_iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; ++it)
- it->second->OnServHelp(u);
+ if (!Config.HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
+ it->second->OnServHelp(u);
notice_help(Config.s_OperServ, u, OPER_HELP_LOGGED);
}
};