summaryrefslogtreecommitdiff
path: root/modules/sasl.cpp
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/sasl.cpp
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/sasl.cpp')
-rw-r--r--modules/sasl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/sasl.cpp b/modules/sasl.cpp
index 9feb3ffa6..d8cd83dcf 100644
--- a/modules/sasl.cpp
+++ b/modules/sasl.cpp
@@ -231,7 +231,7 @@ class SASLService : public SASL::Service, public Timer
msg.type = mtype;
msg.data = data;
- IRCD->SendSASLMessage(msg);
+ IRCD->Send<messages::SASL>(msg);
}
void Succeed(Session *session, NickServ::Account *nc) override
@@ -246,8 +246,8 @@ class SASLService : public SASL::Service, public Timer
}
else
{
- HostServ::VHost *vhost = HostServ::FindVHost(na->GetAccount());
- IRCD->SendSVSLogin(session->uid, nc->GetDisplay(), vhost ? vhost->GetIdent() : "", vhost ? vhost->GetHost() : "");
+ HostServ::VHost *vhost = HostServ::FindVHost(nc);
+ IRCD->Send<messages::SVSLogin>(session->uid, nc->GetDisplay(), vhost ? vhost->GetIdent() : "", vhost ? vhost->GetHost() : "");
}
this->SendMessage(session, "D", "S");
}
@@ -348,7 +348,7 @@ class ModuleSASL : public Module
// If we are connected to the network then broadcast the mechlist.
if (Me && Me->IsSynced())
- IRCD->SendSASLMechanisms(mechs);
+ IRCD->Send<messages::SASLMechanisms>(mechs);
}
public:
@@ -386,7 +386,7 @@ class ModuleSASL : public Module
void OnPreUplinkSync(Server *) override
{
// We have not yet sent a mechanism list so always do it here.
- IRCD->SendSASLMechanisms(mechs);
+ IRCD->Send<messages::SASLMechanisms>(mechs);
}
};