summaryrefslogtreecommitdiff
path: root/modules/commands/ns_register.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/ns_register.cpp')
-rw-r--r--modules/commands/ns_register.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index ab113b934..6fd47ad38 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -180,10 +180,8 @@ class CommandNSRegister : public Command
if (Config->GetModule("nickserv")->Get<bool>("restrictopernicks"))
{
- for (unsigned i = 0; i < Oper::opers.size(); ++i)
+ for (auto *o : Oper::opers)
{
- Oper *o = Oper::opers[i];
-
if (!source.IsOper() && u_nick.find_ci(o->name) != Anope::string::npos)
{
source.Reply(NICK_CANNOT_BE_REGISTERED, u_nick.c_str());