summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-02-20 19:49:01 +0000
committerSadie Powell <sadie@witchery.services>2025-02-20 19:49:01 +0000
commit0c193f8149a0af210383a1798586075d132e4904 (patch)
tree7b4f2479516ed6e2e88d8f9c25228b39b4088d0c /include/modules
parentfa0f78b937a970049623d11361d106cf2f12cedd (diff)
Store the source address in the identify request.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/sasl.h17
1 files changed, 11 insertions, 6 deletions
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";
}