1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 21:43:13 +02:00

Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.

This commit is contained in:
Adam
2013-05-05 01:55:04 -04:00
parent 781defb707
commit 1d0bb9b26b
165 changed files with 3093 additions and 4861 deletions
+5 -4
View File
@@ -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;