diff options
author | Adam <Adam@anope.org> | 2013-09-14 01:44:22 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-27 18:02:26 -0400 |
commit | 3b0b1bc80e6161d5cdf85f792174f31ead178b93 (patch) | |
tree | c19483a02150d39ba07bf775eba00817cd2a4d33 /modules/pseudoclients/operserv.cpp | |
parent | b60b23fd4854101b7283bc189ae6515d547d6ce3 (diff) |
Don't send SQLines unless the IRCd supports it
Diffstat (limited to 'modules/pseudoclients/operserv.cpp')
-rw-r--r-- | modules/pseudoclients/operserv.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 59ef7a067..ddd585841 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -83,12 +83,27 @@ class SQLineManager : public XLineManager void Send(User *u, XLine *x) anope_override { - IRCD->SendSQLine(u, x); + if (!IRCD->CanSQLine) + { + if (!u) + ; + else if (nickserv) + nickserv->Collide(u, NULL); + else + u->Kill(Config->GetClient("OperServ"), "Q-Lined: " + x->reason); + } + else if (x->IsRegex()) + ; + else if (x->mask[0] != '#' || IRCD->CanSQLineChannel) + IRCD->SendSQLine(u, x); } void SendDel(XLine *x) anope_override { - IRCD->SendSQLineDel(x); + if (!IRCD->CanSQLine) + ; + else if (x->mask[0] != '#' || IRCD->CanSQLineChannel) + IRCD->SendSQLineDel(x); } bool Check(User *u, const XLine *x) anope_override |