From 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 5 May 2013 01:55:04 -0400 Subject: Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. --- modules/commands/help.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules/commands/help.cpp') 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("hideprivilegedcommands"); if (params.empty() || params[0].equals_ci("ALL")) { @@ -73,8 +74,8 @@ class CommandHelp : public Command ServiceReference 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 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; -- cgit