+ const std::string name = tag->getString("name");
+
+ // Skip both duplicate sqloper blocks and sqloper blocks that attempt to override conf blocks.
+ if (oper_blocks.find(name) != oper_blocks.end())
+ continue;
+
+ const std::string type = tag->getString("type");
+ ServerConfig::OperIndex::iterator tblk = ServerInstance->Config->OperTypes.find(type);
+ if (tblk == ServerInstance->Config->OperTypes.end())
+ {
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Sqloper block " + name + " has missing type " + type);
+ ServerInstance->SNO->WriteGlobalSno('a', "m_sqloper: Oper block %s has missing type %s", name.c_str(), type.c_str());
+ continue;
+ }
+
+ OperInfo* ifo = new OperInfo(type);
+
+ ifo->type_block = tblk->second->type_block;
+ ifo->oper_block = tag;
+ ifo->class_blocks.assign(tblk->second->class_blocks.begin(), tblk->second->class_blocks.end());
+ oper_blocks[name] = ifo;
+ my_blocks.push_back(name);
+ }
+
+ // If this was done as a result of /OPER and not a config read
+ if (!uid.empty())
+ {
+ // Now that we've updated the DB, call any other /OPER hooks and then call /OPER
+ OperExec();