diff options
author | Sadie Powell <sadie@witchery.services> | 2024-06-10 11:15:30 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-06-10 11:16:05 +0100 |
commit | 8a1bffba9b0ebaa037b8ab9922e96f5cb2616e0c (patch) | |
tree | f11d3db44ae5c2716ef179b06298ebb941eb3f03 | |
parent | 01eef7a392f9fbb9541b4fa57a2316a8267a1666 (diff) |
Fix a crash in ns_cert.
-rw-r--r-- | include/modules.h | 2 | ||||
-rw-r--r-- | modules/nickserv/ns_cert.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h index c942cfbc2..7192092ba 100644 --- a/include/modules.h +++ b/include/modules.h @@ -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 diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index 4a19762f8..a5567b8e8 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -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); |