summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/hs_request.cpp4
-rw-r--r--modules/commands/ns_group.cpp4
-rw-r--r--modules/commands/ns_register.cpp4
-rw-r--r--modules/commands/os_oper.cpp7
4 files changed, 11 insertions, 8 deletions
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp
index 24e13b176..2e503b0d7 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/commands/hs_request.cpp
@@ -373,9 +373,9 @@ static void req_send_memos(Module *me, CommandSource &source, const Anope::strin
host = vHost;
if (Config->GetModule(me)->Get<bool>("memooper") && memoserv)
- for (unsigned i = 0; i < Config->Opers.size(); ++i)
+ for (unsigned i = 0; i < Oper::opers.size(); ++i)
{
- Oper *o = Config->Opers[i];
+ Oper *o = Oper::opers[i];
const NickAlias *na = NickAlias::Find(o->name);
if (!na)
diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp
index c40b5bf89..848416fe8 100644
--- a/modules/commands/ns_group.cpp
+++ b/modules/commands/ns_group.cpp
@@ -99,9 +99,9 @@ class CommandNSGroup : public Command
}
if (Config->GetModule("nickserv")->Get<bool>("restrictopernicks"))
- for (unsigned i = 0; i < Config->Opers.size(); ++i)
+ for (unsigned i = 0; i < Oper::opers.size(); ++i)
{
- Oper *o = Config->Opers[i];
+ Oper *o = Oper::opers[i];
if (!u->HasMode("OPER") && u->nick.find_ci(o->name) != Anope::string::npos)
{
diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp
index a88306fe0..b38cf750d 100644
--- a/modules/commands/ns_register.cpp
+++ b/modules/commands/ns_register.cpp
@@ -160,9 +160,9 @@ class CommandNSRegister : public Command
}
if (Config->GetModule("nickserv")->Get<bool>("restrictopernicks"))
- for (unsigned i = 0; i < Config->Opers.size(); ++i)
+ for (unsigned i = 0; i < Oper::opers.size(); ++i)
{
- Oper *o = Config->Opers[i];
+ Oper *o = Oper::opers[i];
if (!source.IsOper() && u_nick.find_ci(o->name) != Anope::string::npos)
{
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp
index 9bc9326fb..e4eafe2df 100644
--- a/modules/commands/os_oper.cpp
+++ b/modules/commands/os_oper.cpp
@@ -244,10 +244,13 @@ class OSOper : public Module
{
for (nickcore_map::const_iterator it = NickCoreList->begin(), it_end = NickCoreList->end(); it != it_end; ++it)
{
- const NickCore *nc = it->second;
+ NickCore *nc = it->second;
- if (nc->o && !nc->o->config)
+ if (nc->o && dynamic_cast<MyOper *>(nc->o))
+ {
delete nc->o;
+ nc->o = NULL;
+ }
}
}
};