summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-20 09:52:26 -0400
committerAdam <Adam@anope.org>2014-05-20 09:52:26 -0400
commit01021131ca2f8e3808b1f3d284147e759a466f04 (patch)
treea680c6597b062b5a4af0dbf9fbb1e8b6c25d36a7
parent13ea98a02e58777db33c262b4bc27c22fb441b21 (diff)
Also search channel descriptions and topics in /cs list
-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)
{