diff options
| author | Adam <Adam@anope.org> | 2013-11-23 22:12:33 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-11-23 22:12:33 -0500 |
| commit | 90aa576fb3c1ceae434c2a7b794f13941c80b7b3 (patch) | |
| tree | 938d944e802f73c2ac1c33802f8cd508fd1a17ef /modules/commands/ns_register.cpp | |
| parent | 77e57443416fc12f77a1bcf23a7f0341b8d12f9f (diff) | |
Fix/clean/clarify some stuff found by coverity scan
Diffstat (limited to 'modules/commands/ns_register.cpp')
| -rw-r--r-- | modules/commands/ns_register.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index c7e50311d..a88306fe0 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -108,7 +108,6 @@ class CommandNSRegister : public Command void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - NickAlias *na; User *u = source.GetUser(); Anope::string u_nick = source.GetNick(); size_t nicklen = u_nick.length(); @@ -176,7 +175,7 @@ class CommandNSRegister : public Command this->OnSyntaxError(source, ""); else if (u && Anope::CurTime < u->lastnickreg + reg_delay) source.Reply(_("Please wait %d seconds before using the REGISTER command again."), (u->lastnickreg + reg_delay) - Anope::CurTime); - else if ((na = NickAlias::Find(u_nick))) + else if (NickAlias::Find(u_nick) != NULL) source.Reply(NICK_ALREADY_REGISTERED, u_nick.c_str()); else if (pass.equals_ci(u_nick) || (Config->GetBlock("options")->Get<bool>("strictpasswords") && pass.length() < 5)) source.Reply(MORE_OBSCURE_PASSWORD); @@ -187,7 +186,7 @@ class CommandNSRegister : public Command else { NickCore *nc = new NickCore(u_nick); - na = new NickAlias(u_nick, nc); + NickAlias *na = new NickAlias(u_nick, nc); Anope::Encrypt(pass, nc->pass); if (!email.empty()) nc->email = email; |
