diff options
author | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-04-07 23:46:44 -0500 |
commit | fb7fef7a849342ab8463743497e781c5c3e6ae88 (patch) | |
tree | 5d230a68b6eed70c7b4f718410dd62fea779654c /modules/pseudoclients/operserv.cpp | |
parent | 36602224b8b1a11326a224779d16bcb12f0ed532 (diff) |
Optimizations of much of the more commonly used code
Diffstat (limited to 'modules/pseudoclients/operserv.cpp')
-rw-r--r-- | modules/pseudoclients/operserv.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 10908ef03..b2463dc4f 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -35,19 +35,7 @@ class SGLineManager : public XLineManager void SendDel(XLine *x) anope_override { - try - { - if (!IRCD->CanSZLine) - throw SocketException("SZLine is not supported"); - else if (x->GetUser() != "*") - throw SocketException("Can not ZLine a username"); - sockaddrs(x->GetHost()); - IRCD->SendSZLineDel(x); - } - catch (const SocketException &) - { - IRCD->SendAkillDel(x); - } + IRCD->SendAkillDel(x); } bool Check(User *u, const XLine *x) anope_override @@ -70,7 +58,7 @@ class SGLineManager : public XLineManager if (!x->GetReal().empty() && !Anope::Match(u->realname, x->GetReal())) return false; - if (!x->GetHost().empty()) + if (x->GetHost().find('/') != Anope::string::npos) { try { @@ -82,7 +70,7 @@ class SGLineManager : public XLineManager catch (const SocketException &) { } } - if (x->GetHost().empty() || Anope::Match(u->host, x->GetHost())) + if (x->GetHost().empty() || Anope::Match(u->host, x->GetHost()) || Anope::Match(u->ip, x->GetHost())) return true; return false; |