1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 11:03:12 +02:00

Add the ReplaceCert method to CertService.

This commit is contained in:
Sadie Powell
2024-05-01 21:20:31 +01:00
parent 4cfee23303
commit e9243c3fde
2 changed files with 12 additions and 0 deletions
+11
View File
@@ -26,6 +26,17 @@ struct CertServiceImpl final
return it->second;
return NULL;
}
void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) override
{
auto *nc = FindAccountFromCert(oldcert);
if (!nc)
return;
auto *cl = nc->GetExt<NSCertList>("certificates");
if (cl)
cl->ReplaceCert(oldcert, newcert);
}
};
struct NSCertListImpl final