summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/ns_register.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index 8020dd3f0..434e7d690 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -54,10 +54,13 @@ class CommandNSConfirm : public Command
if (source.GetUser())
{
- IRCD->SendLogin(source.GetUser());
- const NickAlias *na = NickAlias::Find(source.GetNick());
- if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && na != NULL && na->nc == source.GetAccount() && !na->nc->HasExt("UNCONFIRMED"))
- source.GetUser()->SetMode(source.service, "REGISTERED");
+ NickAlias *na = NickAlias::Find(source.GetNick());
+ if (na)
+ {
+ IRCD->SendLogin(source.GetUser(), na);
+ if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && na->nc == source.GetAccount() && !na->nc->HasExt("UNCONFIRMED"))
+ source.GetUser()->SetMode(source.service, "REGISTERED");
+ }
}
}
else