diff options
-rw-r--r-- | include/protocol.h | 2 | ||||
-rw-r--r-- | modules/m_sasl.cpp | 3 | ||||
-rw-r--r-- | modules/protocol/charybdis.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd20.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/unreal4.cpp | 2 |
7 files changed, 9 insertions, 8 deletions
diff --git a/include/protocol.h b/include/protocol.h index 2811a8c3f..d8029d53d 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -229,7 +229,7 @@ class CoreExport IRCDProto : public Service virtual void SendSASLMechanisms(std::vector<Anope::string> &) { } virtual void SendSASLMessage(const SASL::Message &) { } - virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) { } + virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) { } virtual bool IsNickValid(const Anope::string &); virtual bool IsChannelValid(const Anope::string &); diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index 630c5e3ab..2e0410e7c 100644 --- a/modules/m_sasl.cpp +++ b/modules/m_sasl.cpp @@ -226,13 +226,14 @@ class SASLService : public SASL::Service, public Timer // If the user is already introduced then we log them in now. // Otherwise, we send an SVSLOGIN to log them in later. User *user = User::Find(session->uid); + const NickAlias *na = NickAlias::Find(nc->display); if (user) { user->Login(nc); } else { - IRCD->SendSVSLogin(session->uid, nc->display); + IRCD->SendSVSLogin(session->uid, nc->display, na->GetVhostIdent(), na->GetVhostHost()); } this->SendMessage(session, "D", "S"); } diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 41da42c76..4d4fa5ec0 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -159,10 +159,10 @@ class CharybdisProto : public IRCDProto UplinkSocket::Message(Me) << "ENCAP " << (s ? s->GetName() : message.target.substr(0, 3)) << " SASL " << message.source << " " << message.target << " " << message.type << " " << message.data << (message.ext.empty() ? "" : (" " + message.ext)); } - void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) anope_override + void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { Server *s = Server::Find(uid.substr(0, 3)); - UplinkSocket::Message(Me) << "ENCAP " << (s ? s->GetName() : uid.substr(0, 3)) << " SVSLOGIN " << uid << " * * * " << acc; + UplinkSocket::Message(Me) << "ENCAP " << (s ? s->GetName() : uid.substr(0, 3)) << " SVSLOGIN " << uid << " * " << (!vident.empty() ? vident : '*') << " " << (!vhost.empty() ? vhost : '*') << " " << acc; } }; diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index d2224139d..b8d846d5f 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -406,7 +406,7 @@ class InspIRCd12Proto : public IRCDProto UplinkSocket::Message(Me) << "ENCAP " << message.target.substr(0, 3) << " SASL " << message.source << " " << message.target << " " << message.type << " " << message.data << (message.ext.empty() ? "" : (" " + message.ext)); } - void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) anope_override + void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { UplinkSocket::Message(Me) << "METADATA " << uid << " accountname :" << acc; diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index a295ee999..859bc667f 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -81,7 +81,7 @@ class InspIRCd20Proto : public IRCDProto void SendLogout(User *u) anope_override { insp12->SendLogout(u); } void SendChannel(Channel *c) anope_override { insp12->SendChannel(c); } void SendSASLMessage(const SASL::Message &message) anope_override { insp12->SendSASLMessage(message); } - void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) anope_override { insp12->SendSVSLogin(uid, acc); } + void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { insp12->SendSVSLogin(uid, acc, vident, vhost); } bool IsExtbanValid(const Anope::string &mask) anope_override { return insp12->IsExtbanValid(mask); } bool IsIdentValid(const Anope::string &ident) anope_override { return insp12->IsIdentValid(ident); } }; diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 81cf36c73..cff2f440b 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -386,7 +386,7 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message(BotInfo::Find(message.source)) << "SASL " << message.target.substr(0, p) << " " << message.target << " " << message.type << " " << message.data << (message.ext.empty() ? "" : " " + message.ext); } - void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) anope_override + void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { size_t p = uid.find('!'); if (p == Anope::string::npos) diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index dcda07e40..a9928316d 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -374,7 +374,7 @@ class UnrealIRCdProto : public IRCDProto UplinkSocket::Message(BotInfo::Find(message.source)) << "SASL " << message.target.substr(0, p) << " " << message.target << " " << message.type << " " << message.data << (message.ext.empty() ? "" : " " + message.ext); } - void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) anope_override + void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { size_t p = uid.find('!'); if (p == Anope::string::npos) |