diff options
| author | Adam <Adam@anope.org> | 2016-12-17 21:44:22 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-12-17 21:44:22 -0500 |
| commit | 4fcbbbe4fbc137841b47c8e2372477b85649270a (patch) | |
| tree | f2a5fd3b5a77ef0384df6e2712fdd74f832d7dfe /modules/operserv/main | |
| parent | ed08d1a31119adb379f8bec46d7ad47ee35c4c92 (diff) | |
Split ircdproto send functions out into separate services
This makes it easier to see which send functions a protocol module
implements as they are all explicitly registered by the module, and
avoids the problem of subtly breaking other protocol modules when
using inheritance.
Also split the old "core" send implementations out into a module, and
the TS6 ID generator
Diffstat (limited to 'modules/operserv/main')
| -rw-r--r-- | modules/operserv/main/operserv.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/operserv/main/operserv.cpp b/modules/operserv/main/operserv.cpp index 09dc3bbac..fc8dbf423 100644 --- a/modules/operserv/main/operserv.cpp +++ b/modules/operserv/main/operserv.cpp @@ -38,12 +38,12 @@ class SGLineManager : public XLineManager void Send(User *u, XLine *x) override { - IRCD->SendAkill(u, x); + IRCD->Send<messages::Akill>(u, x); } void SendDel(XLine *x) override { - IRCD->SendAkillDel(x); + IRCD->Send<messages::AkillDel>(x); } bool Check(User *u, XLine *x) override @@ -106,7 +106,7 @@ class SQLineManager : public XLineManager } else if (x->GetMask()[0] != '#' || IRCD->CanSQLineChannel) { - IRCD->SendSQLine(u, x); + IRCD->Send<messages::SQLine>(u, x); /* If it is an oper, assume they're walking it, otherwise kill for good measure */ if (u && !u->HasMode("OPER")) u->Kill(Config->GetClient("OperServ"), "Q-Lined: " + x->GetReason()); @@ -118,7 +118,7 @@ class SQLineManager : public XLineManager if (!IRCD->CanSQLine || x->IsRegex()) ; else if (x->GetMask()[0] != '#' || IRCD->CanSQLineChannel) - IRCD->SendSQLineDel(x); + IRCD->Send<messages::SQLineDel>(x); } bool Check(User *u, XLine *x) override @@ -168,7 +168,7 @@ class SNLineManager : public XLineManager void Send(User *u, XLine *x) override { if (IRCD->CanSNLine && !x->IsRegex()) - IRCD->SendSGLine(u, x); + IRCD->Send<messages::SGLine>(u, x); if (u) u->Kill(Config->GetClient("OperServ"), "SNLined: " + x->GetReason()); @@ -177,7 +177,7 @@ class SNLineManager : public XLineManager void SendDel(XLine *x) override { if (IRCD->CanSNLine && !x->IsRegex()) - IRCD->SendSGLineDel(x); + IRCD->Send<messages::SGLineDel>(x); } bool Check(User *u, XLine *x) override |
