summaryrefslogtreecommitdiff
path: root/src/commands.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/commands.cpp
parenta49521302628982f62ddadd997a81734f4d8c84f (diff)
Added options:hideprivilegedcommands config option to hide privileged commands from normal users
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 7396968c4..ebe189fd4 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -167,7 +167,7 @@ void mod_help_cmd(BotInfo *bi, User *u, const ci::string &cmd)
ci::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining().c_str();
- if (!c || !c->OnHelp(u, subcommand))
+ if (!c || (Config.HidePrivilegedCommands && !c->permission.empty() && (!u->Account() || !u->Account()->HasCommand(c->permission))) || !c->OnHelp(u, subcommand))
notice_lang(bi->nick, u, NO_HELP_AVAILABLE, cmd.c_str());
else
{