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 c8901fa03..ba3c95aa3 100644
--- a/modules/commands/cs_list.cpp
+++ b/modules/commands/cs_list.cpp
@@ -12,6 +12,7 @@
#include "module.h"
#include "modules/cs_info.h"
#include "modules/cs_set.h"
+#include "modules/cs_mode.h"
class CommandCSList : public Command
{
@@ -89,6 +90,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"))
@@ -97,7 +103,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)
{