diff options
| author | Adam <Adam@anope.org> | 2013-12-19 21:34:21 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-12-19 21:34:21 -0500 |
| commit | c0cd76a0a5be7bbbcf3e891357e5a8caa7ad8038 (patch) | |
| tree | 96f6d3be5a37f6c4a2374d35d3fd6714ecb974fa /modules | |
| parent | ab6cd3b26caf127d1052e58e9f906d8ed5c3d986 (diff) | |
Don't leak opers and opertypes on /os reload, fix not updating opertypes on non conf opers on rehash
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/os_oper.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index e4eafe2df..759f48688 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -145,7 +145,7 @@ class CommandOSOper : public Command continue; source.Reply(_("%-8s %s"), nc->o->name.c_str(), nc->o->ot->GetName().c_str()); - if (nc->o->config) + if (std::find(Config->Opers.begin(), Config->Opers.end(), nc->o) != Config->Opers.end()) source.Reply(_(" This oper is configured in the configuration file.")); for (std::list<User *>::const_iterator uit = nc->users.begin(); uit != nc->users.end(); ++uit) { diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 85e5d8f7d..68a6d9084 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -49,7 +49,7 @@ class SQLOperResult : public SQL::Interface BotInfo *OperServ = Config->GetClient("OperServ"); if (opertype.empty()) { - if (user->Account() && user->Account()->o && !user->Account()->o->config && dynamic_cast<SQLOper *>(user->Account()->o)) + if (user->Account() && user->Account()->o && dynamic_cast<SQLOper *>(user->Account()->o)) { delete user->Account()->o; user->Account()->o = NULL; |
