summaryrefslogtreecommitdiff
path: root/modules/commands/cs_list.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_list.cpp')
-rw-r--r--modules/commands/cs_list.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp
index d58d105b7..fb056f9b2 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/commands/cs_list.cpp
@@ -10,6 +10,7 @@
*/
#include "module.h"
+#include "modules/cs_mode.h"
class CommandCSList : public Command
{
@@ -87,6 +88,11 @@ class CommandCSList : public Command
continue;
if (ci->c && ci->c->HasMode("SECRET"))
continue;
+
+ ModeLocks *ml = ci->GetExt<ModeLocks>("modelocks");
+ const ModeLock *secret = ml ? ml->GetMLock("SECRET") : NULL;
+ if (secret && secret->set)
+ continue;
}
if (suspended && !ci->HasExt("CS_SUSPENDED"))
@@ -95,7 +101,7 @@ class CommandCSList : public Command
if (channoexpire && !ci->HasExt("CS_NO_EXPIRE"))
continue;
- if (pattern.equals_ci(ci->name) || ci->name.equals_ci(spattern) || Anope::Match(ci->name, pattern, false, true) || Anope::Match(ci->name, spattern, false, true))
+ if (pattern.equals_ci(ci->name) || ci->name.equals_ci(spattern) || Anope::Match(ci->name, pattern, false, true) || Anope::Match(ci->name, spattern, false, true) || Anope::Match(ci->desc, pattern, false, true) || Anope::Match(ci->last_topic, pattern, false, true))
{
if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nchans <= listmax)
{