summaryrefslogtreecommitdiff
path: root/modules/commands/help.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/commands/help.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/commands/help.cpp')
-rw-r--r--modules/commands/help.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp
index a55af89ff..eaf45ebf4 100644
--- a/modules/commands/help.cpp
+++ b/modules/commands/help.cpp
@@ -46,6 +46,7 @@ class CommandHelp : public Command
Anope::string source_command = source.command;
const BotInfo *bi = source.service;
const CommandInfo::map &map = source.c ? Config->Fantasy : bi->commands;
+ bool hide_privileged_commands = Config->GetBlock("options")->Get<bool>("hideprivilegedcommands");
if (params.empty() || params[0].equals_ci("ALL"))
{
@@ -73,8 +74,8 @@ class CommandHelp : public Command
ServiceReference<Command> c("Command", info.name);
if (!c)
continue;
- else if (!Config->HidePrivilegedCommands)
- ; // Always show with HidePrivilegedCommands disabled
+ else if (!hide_privileged_commands)
+ ; // Always show with hide_privileged_commands disabled
else if (!c->AllowUnregistered() && !source.GetAccount())
continue;
else if (!info.permission.empty() && !source.HasCommand(info.permission))
@@ -146,8 +147,8 @@ class CommandHelp : public Command
ServiceReference<Command> c("Command", info.name);
if (!c)
continue;
- else if (!Config->HidePrivilegedCommands)
- ; // Always show with HidePrivilegedCommands disabled
+ else if (!hide_privileged_commands)
+ ; // Always show with hide_privileged_commands disabled
else if (!info.permission.empty() && !source.HasCommand(info.permission))
continue;