1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 12:23:14 +02:00

Fix a crash in ns_cert.

This commit is contained in:
Sadie Powell
2024-06-10 11:15:30 +01:00
parent 01eef7a392
commit 8a1bffba9b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -740,7 +740,7 @@ public:
* @param The nick
* @param pass The password of the newly registered nick
*/
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
/** Called when a nick is confirmed. This will never be called if registration confirmation is not enabled.
* @param user The user confirming the nick
+1 -1
View File
@@ -418,7 +418,7 @@ public:
void OnNickRegister(User *u, NickAlias *na, const Anope::string &pass) override
{
if (!Config->GetModule(this)->Get<bool>("automatic", "yes") || u->fingerprint.empty())
if (!Config->GetModule(this)->Get<bool>("automatic", "yes") || !u || u->fingerprint.empty())
return;
auto *cl = certs.Require(na->nc);