X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sqloper.cpp;h=e4aaab474e41720146a29af12607a7f4e2130d0c;hb=9ed9396278c2499f5322575c87aa4daea33992e3;hp=4728170192e8cbc6c47d644643fe3cac36f96904;hpb=4ec475ba10b65785277ed9dab5f99775289165b3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 472817019..e4aaab474 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -96,6 +96,7 @@ class OperQuery : public SQL::Query ifo->class_blocks.assign(tblk->second->class_blocks.begin(), tblk->second->class_blocks.end()); oper_blocks[name] = ifo; my_blocks.push_back(name); + row.clear(); } // If this was done as a result of /OPER and not a config read @@ -109,7 +110,7 @@ class OperQuery : public SQL::Query void OnError(SQL::Error& error) CXX11_OVERRIDE { ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "query failed (%s)", error.ToString()); - ServerInstance->SNO->WriteGlobalSno('a', "m_sqloper: failed to update blocks from database"); + ServerInstance->SNO->WriteGlobalSno('a', "m_sqloper: Failed to update blocks from database"); if (!uid.empty()) { // Fallback. We don't want to block a netadmin from /OPER @@ -130,7 +131,7 @@ class OperQuery : public SQL::Query if (oper_command) { - std::vector params; + CommandBase::Params params; params.push_back(username); params.push_back(password); @@ -138,12 +139,13 @@ class OperQuery : public SQL::Query ModResult MOD_RESULT; std::string origin = "OPER"; - FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (origin, params, localuser, true, origin)); + FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (origin, params, localuser, true)); if (MOD_RESULT == MOD_RES_DENY) return; // Now handle /OPER. - oper_command->Handle(params, user); + ClientProtocol::TagMap tags; + oper_command->Handle(user, CommandBase::Params(params, tags)); } else { @@ -195,7 +197,7 @@ public: } } - ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser* user, bool validated, const std::string& original_line) CXX11_OVERRIDE + ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) CXX11_OVERRIDE { // If we are not in the middle of an existing /OPER and someone is trying to oper-up if (validated && command == "OPER" && parameters.size() >= 2 && !active)