summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/operserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-03-11 14:49:03 -0400
committerAdam <Adam@anope.org>2015-03-11 14:49:03 -0400
commit92920f5a1c8866c8e26e1608f0feb3e3e54c8dd2 (patch)
tree086d7565aa425c9a360836c3431cffd35cf2a45e /modules/pseudoclients/operserv.cpp
parentbf727285bcf7c7c95c2b2b43faa3d1fa13bad6fb (diff)
Only matches sqlines against channels if they begin with a #
Diffstat (limited to 'modules/pseudoclients/operserv.cpp')
-rw-r--r--modules/pseudoclients/operserv.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index 67eaecd45..439c33708 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -117,13 +117,20 @@ class SQLineManager : public XLineManager
for (std::vector<XLine *>::const_iterator it = this->GetList().begin(), it_end = this->GetList().end(); it != it_end; ++it)
{
XLine *x = *it;
+
if (x->regex)
{
if (x->regex->Matches(c->name))
return x;
}
- else if (Anope::Match(c->name, x->mask, false, true))
- return x;
+ else
+ {
+ if (x->mask.empty() || x->mask[0] != '#')
+ continue;
+
+ if (Anope::Match(c->name, x->mask, false, true))
+ return x;
+ }
}
return NULL;
}