summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/operserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-02 13:06:48 -0400
committerAdam <Adam@anope.org>2014-04-02 13:08:14 -0400
commit52bc8e4bc799d38e92d38d497a2bd055950841bb (patch)
treeb80ea985f1adffa43ca046c014e3b81f9404db8d /modules/pseudoclients/operserv.cpp
parentee133c03f206a7fab78a700b183fbc8684b9d6bf (diff)
Remove regex mods, use std::regex instead
Diffstat (limited to 'modules/pseudoclients/operserv.cpp')
-rw-r--r--modules/pseudoclients/operserv.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index 885cfcc85..7b43436f7 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -41,7 +41,7 @@ class SGLineManager : public XLineManager
if (x->regex)
{
Anope::string uh = u->GetIdent() + "@" + u->host, nuhr = u->nick + "!" + uh + "#" + u->realname;
- return x->regex->Matches(uh) || x->regex->Matches(nuhr);
+ return std::regex_match(uh.str(), *x->regex) || std::regex_match(nuhr.str(), *x->regex);
}
if (!x->GetNick().empty() && !Anope::Match(u->nick, x->GetNick()))
@@ -111,7 +111,7 @@ class SQLineManager : public XLineManager
bool Check(User *u, const XLine *x) override
{
if (x->regex)
- return x->regex->Matches(u->nick);
+ return std::regex_match(u->nick.c_str(), *x->regex);
return Anope::Match(u->nick, x->mask);
}
@@ -122,7 +122,7 @@ class SQLineManager : public XLineManager
XLine *x = *it;
if (x->regex)
{
- if (x->regex->Matches(c->name))
+ if (std::regex_match(c->name.str(), *x->regex))
return x;
}
else if (Anope::Match(c->name, x->mask, false, true))
@@ -165,7 +165,7 @@ class SNLineManager : public XLineManager
bool Check(User *u, const XLine *x) override
{
if (x->regex)
- return x->regex->Matches(u->realname);
+ return std::regex_match(u->realname.str(), *x->regex);
return Anope::Match(u->realname, x->mask, false, true);
}
};