summaryrefslogtreecommitdiff
path: root/modules/chanserv
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-12-17 21:44:22 -0500
committerAdam <Adam@anope.org>2016-12-17 21:44:22 -0500
commit4fcbbbe4fbc137841b47c8e2372477b85649270a (patch)
treef2a5fd3b5a77ef0384df6e2712fdd74f832d7dfe /modules/chanserv
parented08d1a31119adb379f8bec46d7ad47ee35c4c92 (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/chanserv')
-rw-r--r--modules/chanserv/invite.cpp2
-rw-r--r--modules/chanserv/main/chanserv.cpp4
-rw-r--r--modules/chanserv/set.cpp2
3 files changed, 4 insertions, 4 deletions
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<messages::Invite>(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<messages::MessageChannel>(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<messages::MessageChannel>(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<messages::MessageChannel>(c);
c->Reset();
}
}