- else
- {
- char broadcast[MAXBUF];
-
- if (!type_invalid)
- {
- std::string fields;
- if (!match_login)
- fields.append("login ");
- else
- {
- if (!match_pass)
- fields.append("password ");
- if (!match_hosts)
- fields.append("hosts");
- }
-
- // tell them they suck, and lag them up to help prevent brute-force attacks
- user->WriteNumeric(491, "%s :Invalid oper credentials",user->nick.c_str());
- user->IncreasePenalty(10);
-
- snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str(), fields.c_str());
- ServerInstance->SNO->WriteToSnoMask('o',std::string(broadcast));
- ServerInstance->PI->SendSNONotice("o", std::string("OPER: ") + broadcast);
-
- ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': The following fields did not match: %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str(), fields.c_str());
- return CMD_FAILURE;
- }
- else
- {
- user->WriteNumeric(491, "%s :Your oper block does not have a valid opertype associated with it",user->nick.c_str());
-
- snprintf(broadcast, MAXBUF, "CONFIGURATION ERROR! Oper block '%s': missing OperType %s",parameters[0].c_str(),OperType);