1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 19:43:13 +02:00

Don't leak opers and opertypes on /os reload, fix not updating opertypes on non conf opers on rehash

This commit is contained in:
Adam
2013-12-19 21:34:21 -05:00
parent ab6cd3b26c
commit c0cd76a0a5
6 changed files with 42 additions and 13 deletions
+1 -1
View File
@@ -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)
{
+1 -1
View File
@@ -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;