From 8210e82a5ea02232e649a3f1c5f27214c655c5b6 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 3 Aug 2014 19:08:12 -0400 Subject: Fix some botserv help entries from showing when they shouldn't --- modules/commands/cs_set.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/commands/cs_set.cpp') diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 1109c888e..77e1d1fd5 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -35,7 +35,8 @@ class CommandCSSet : public Command " \n" "Available options:")); Anope::string this_name = source.command; - bool hide_privileged_commands = Config->GetBlock("options")->Get("hideprivilegedcommands"); + bool hide_privileged_commands = Config->GetBlock("options")->Get("hideprivilegedcommands"), + hide_registered_commands = Config->GetBlock("options")->Get("hideregisteredcommands"); for (CommandInfo::map::const_iterator it = source.service->commands.begin(), it_end = source.service->commands.end(); it != it_end; ++it) { const Anope::string &c_name = it->first; @@ -44,13 +45,12 @@ class CommandCSSet : public Command { ServiceReference c("Command", info.name); + // XXX dup if (!c) continue; - else if (!hide_privileged_commands) - ; // Always show with hide_privileged_commands disabled - else if (!c->AllowUnregistered() && !source.GetAccount()) + else if (hide_registered_commands && !c->AllowUnregistered() && !source.GetAccount()) continue; - else if (!info.permission.empty() && !source.HasCommand(info.permission)) + else if (hide_privileged_commands && !info.permission.empty() && !source.HasCommand(info.permission)) continue; source.command = it->first; -- cgit