diff options
author | genius3000 <genius3000@g3k.solutions> | 2018-04-02 04:02:23 -0600 |
---|---|---|
committer | genius3000 <genius3000@g3k.solutions> | 2018-04-02 04:02:23 -0600 |
commit | 7638c7a884337f45a5458e786bad640d066671fa (patch) | |
tree | b7c96e13f4ab57006c018c41bbfa7b434649e198 | |
parent | d25722ddd0766cba2c33614e326d241d3f1f7eeb (diff) |
Check for 'hide' flag in commands in (bs,cs,ns)_set HELP
This code is duplicated from help.cpp to (bs,cs,ns)_set.cpp for listing
the available SET commands. The check for the 'hide' flag was missed
and this incorrectly listed commands that were configured as hidden.
-rw-r--r-- | modules/commands/bs_set.cpp | 3 | ||||
-rw-r--r-- | modules/commands/cs_set.cpp | 3 | ||||
-rw-r--r-- | modules/commands/ns_set.cpp | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index eeb7cf7c5..fc442fa43 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -41,6 +41,9 @@ class CommandBSSet : public Command const CommandInfo &info = it->second; if (c_name.find_ci(this_name + " ") == 0) { + if (info.hide) + continue; + ServiceReference<Command> command("Command", info.name); if (command) { diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index ccb15661d..d7144b408 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -43,6 +43,9 @@ class CommandCSSet : public Command const CommandInfo &info = it->second; if (c_name.find_ci(this_name + " ") == 0) { + if (info.hide) + continue; + ServiceReference<Command> c("Command", info.name); // XXX dup diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index dc007289e..e7328b198 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -42,6 +42,9 @@ class CommandNSSet : public Command if (c_name.find_ci(this_name + " ") == 0) { + if (info.hide) + continue; + ServiceReference<Command> c("Command", info.name); // XXX dup if (!c) |