diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-03 23:54:03 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-03 23:57:12 +0000 |
commit | 34896cefe99152ffad1cfd9dac2efbc52fcb8fa0 (patch) | |
tree | 4412680fe910b90767cc8b290ad2eb268c4f5324 /include/modules | |
parent | c0c7046a6df35d416f6cccf4fc0ea55018a12d93 (diff) |
Misc cleanup of ns_sasl and sasl.h.
Diffstat (limited to 'include/modules')
-rw-r--r-- | include/modules/sasl.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/modules/sasl.h b/include/modules/sasl.h index cbc773f5a..648287f79 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -42,7 +42,7 @@ namespace SASL virtual void RemoveSession(Session *) = 0; }; - static ServiceReference<SASL::Service> sasl("SASL::Service", "sasl"); + static ServiceReference<SASL::Service> service("SASL::Service", "sasl"); struct Session { @@ -65,8 +65,8 @@ namespace SASL virtual ~Session() { - if (sasl) - sasl->RemoveSession(this); + if (service) + service->RemoveSession(this); } }; @@ -83,8 +83,8 @@ namespace SASL virtual ~Mechanism() { - if (sasl) - sasl->DeleteSessions(this, true); + if (service) + service->DeleteSessions(this, true); } }; @@ -114,7 +114,7 @@ namespace SASL void OnSuccess() override { - if (!sasl) + if (!service) return; NickAlias *na = NickAlias::Find(GetAccount()); @@ -125,24 +125,24 @@ namespace SASL if (maxlogins && na->nc->users.size() >= maxlogins) return OnFail(); - Session *s = sasl->GetSession(uid); + Session *s = service->GetSession(uid); if (s) { Log(this->GetOwner(), "sasl", Config->GetClient("NickServ")) << GetUserInfo() << " identified to account " << this->GetAccount() << " using SASL"; - sasl->Succeed(s, na->nc); + service->Succeed(s, na->nc); delete s; } } void OnFail() override { - if (!sasl) + if (!service) return; - Session *s = sasl->GetSession(uid); + Session *s = service->GetSession(uid); if (s) { - sasl->Fail(s); + service->Fail(s); delete s; } |