1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 15:13:13 +02:00

Avoid duplicate entries in ReplaceCert.

This commit is contained in:
Sadie Powell
2024-04-13 12:17:29 +01:00
parent e8fee93a7e
commit 7c93007aa6
+8
View File
@@ -111,6 +111,14 @@ public:
FOREACH_MOD(OnNickEraseCert, (this->nc, oldentry));
certmap.erase(oldentry);
if (std::find(this->certs.begin(), this->certs.end(), newentry) != this->certs.end())
{
// The cert we're upgrading to already exists.
this->certs.erase(it);
return;
}
*it = newentry;
certmap[newentry] = nc;
FOREACH_MOD(OnNickAddCert, (this->nc, newentry));