syntax = "<username> <password>";
}
-CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, LocalUser *user)
+CmdResult CommandOper::HandleLocal(LocalUser* user, const Params& parameters)
{
bool match_login = false;
bool match_pass = false;
bool match_hosts = false;
- const std::string userHost = user->ident + "@" + user->host;
+ const std::string userHost = user->ident + "@" + user->GetRealHost();
const std::string userIP = user->ident + "@" + user->GetIPString();
ServerConfig::OperIndex::const_iterator i = ServerInstance->Config->oper_blocks.find(parameters[0]);
user->CommandFloodPenalty += 10000;
ServerInstance->SNO->WriteGlobalSno('o', "WARNING! Failed oper attempt by %s using login '%s': The following fields do not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());
- ServerInstance->Logs->Log("OPER", LOG_DEFAULT, "OPER: Failed oper attempt by %s using login '%s': The following fields did not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());
return CMD_FAILURE;
}