summaryrefslogtreecommitdiff
path: root/modules/commands/ns_list.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-02-22 18:12:02 -0500
committerAdam <Adam@anope.org>2012-02-22 18:12:02 -0500
commit3850b073ddf610415de54dced9ff134397779676 (patch)
treec1a464fba432a7a79535fac4c05cc46f8f19901e /modules/commands/ns_list.cpp
parent81e50dd1f404c9bad008fe1b569dad134df91125 (diff)
Added regex support for many commands, such as akill, sqline, snline,
all of the */list commands, etc. Also extended the ability of akill to match a full nick!user@host and real name of users.
Diffstat (limited to 'modules/commands/ns_list.cpp')
-rw-r--r--modules/commands/ns_list.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp
index 491ed8733..de2852302 100644
--- a/modules/commands/ns_list.cpp
+++ b/modules/commands/ns_list.cpp
@@ -93,7 +93,7 @@ class CommandNSList : public Command
* Instead we build a nice nick!user@host buffer to compare.
* The output is then generated separately. -TheShadow */
Anope::string buf = Anope::printf("%s!%s", na->nick.c_str(), !na->last_usermask.empty() ? na->last_usermask.c_str() : "*@*");
- if (na->nick.equals_ci(pattern) || Anope::Match(buf, pattern))
+ if (na->nick.equals_ci(pattern) || Anope::Match(buf, pattern, false, true))
{
if (((count + 1 >= from && count + 1 <= to) || (!from && !to)) && ++nnicks <= Config->NSListMax)
{
@@ -156,6 +156,10 @@ class CommandNSList : public Command
" \n"
" \002LIST * NOEXPIRE\002\n"
" Lists all registered nicks which have been set to not expire.\n"));
+ if (!Config->RegexEngine.empty())
+ source.Reply(" \n"
+ "Regex matches are also supported using the %s engine.\n"
+ "Enclose your pattern in // if this desired.", Config->RegexEngine.c_str());
return true;
}