From 0c193f8149a0af210383a1798586075d132e4904 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 20 Feb 2025 19:49:01 +0000 Subject: Store the source address in the identify request. --- include/modules/sasl.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'include/modules') diff --git a/include/modules/sasl.h b/include/modules/sasl.h index e5786b524..f088ec1f1 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -81,10 +81,15 @@ namespace SASL : public ::IdentifyRequest { Anope::string uid; - Anope::string hostname, ip; + Anope::string hostname; public: - IdentifyRequest(Module *m, const Anope::string &id, const Anope::string &acc, const Anope::string &pass, const Anope::string &h, const Anope::string &i) : ::IdentifyRequest(m, acc, pass), uid(id), hostname(h), ip(i) { } + IdentifyRequest(Module *m, const Anope::string &id, const Anope::string &acc, const Anope::string &pass, const Anope::string &h, const Anope::string &i) + : ::IdentifyRequest(m, acc, pass, i) + , uid(id) + , hostname(h) + { + } void OnSuccess() override { @@ -103,8 +108,8 @@ namespace SASL if (s) { Anope::string user = "A user"; - if (!hostname.empty() && !ip.empty()) - user = hostname + " (" + ip + ")"; + if (!hostname.empty() && !GetAddress().empty()) + user = hostname + " (" + GetAddress() + ")"; Log(this->GetOwner(), "sasl", Config->GetClient("NickServ")) << user << " identified to account " << this->GetAccount() << " using SASL"; sasl->Succeed(s, na->nc); @@ -134,8 +139,8 @@ namespace SASL accountstatus = "unconfirmed "; Anope::string user = "A user"; - if (!hostname.empty() && !ip.empty()) - user = hostname + " (" + ip + ")"; + if (!hostname.empty() && !GetAddress().empty()) + user = hostname + " (" + GetAddress() + ")"; Log(this->GetOwner(), "sasl", Config->GetClient("NickServ")) << user << " failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL"; } -- cgit