From 4fcbbbe4fbc137841b47c8e2372477b85649270a Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 17 Dec 2016 21:44:22 -0500 Subject: 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 --- modules/chanserv/invite.cpp | 2 +- modules/chanserv/main/chanserv.cpp | 4 ++-- modules/chanserv/set.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/chanserv') diff --git a/modules/chanserv/invite.cpp b/modules/chanserv/invite.cpp index b6d0f19c9..9c21bc704 100644 --- a/modules/chanserv/invite.cpp +++ b/modules/chanserv/invite.cpp @@ -78,7 +78,7 @@ class CommandCSInvite : public Command bool override = !source.AccessFor(ci).HasPriv("INVITE"); - IRCD->SendInvite(ci->WhoSends(), c, u2); + IRCD->Send(ci->WhoSends(), c, u2); if (u2 != u) { source.Reply(_("\002{0}\002 has been invited to \002{1}\002."), u2->nick, c->name); diff --git a/modules/chanserv/main/chanserv.cpp b/modules/chanserv/main/chanserv.cpp index b6aedb0dd..492f64459 100644 --- a/modules/chanserv/main/chanserv.cpp +++ b/modules/chanserv/main/chanserv.cpp @@ -471,7 +471,7 @@ class ChanServCore : public Module if (ModeManager::FindChannelModeByName("PERM") != NULL) { if (c) - IRCD->SendChannel(ci->c); + IRCD->Send(ci->c); ci->c->SetMode(NULL, "PERM"); } else @@ -513,7 +513,7 @@ class ChanServCore : public Module { ::Log(LOG_DEBUG) << "Changing TS of " << c->name << " from " << c->creation_time << " to " << c->ci->GetTimeRegistered(); c->creation_time = c->ci->GetTimeRegistered(); - IRCD->SendChannel(c); + IRCD->Send(c); c->Reset(); } } diff --git a/modules/chanserv/set.cpp b/modules/chanserv/set.cpp index 89eb4985a..833817cde 100644 --- a/modules/chanserv/set.cpp +++ b/modules/chanserv/set.cpp @@ -1242,7 +1242,7 @@ class CSSet : public Module { Log(LOG_DEBUG) << "Changing TS of " << c->name << " from " << c->creation_time << " to " << c->ci->GetTimeRegistered(); c->creation_time = c->ci->GetTimeRegistered(); - IRCD->SendChannel(c); + IRCD->Send(c); c->Reset(); } } -- cgit