From 7638c7a884337f45a5458e786bad640d066671fa Mon Sep 17 00:00:00 2001 From: genius3000 Date: Mon, 2 Apr 2018 04:02:23 -0600 Subject: [PATCH] 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. --- modules/commands/bs_set.cpp | 3 +++ modules/commands/cs_set.cpp | 3 +++ modules/commands/ns_set.cpp | 3 +++ 3 files changed, 9 insertions(+) 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", 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 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 c("Command", info.name); // XXX dup if (!c)