- else
- {
- std::deque<std::string> n;
- n.push_back("o");
- 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->WriteServ("491 %s :Invalid oper credentials",user->nick);
- 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,user->ident,user->host, parameters[0], fields.c_str());
- ServerInstance->SNO->WriteToSnoMask('o',std::string(broadcast));
- n.push_back(broadcast);
- Event rmode2((char *)&n, NULL, "send_snoset");
- rmode2.Send(ServerInstance);
-
- ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s using login '%s': The following fields did not match: %s",user->nick,user->ident,user->host,parameters[0],fields.c_str());
- return CMD_FAILURE;
- }
- else
- {
- user->WriteServ("491 %s :Your oper block does not have a valid opertype associated with it",user->nick);
-
- snprintf(broadcast, MAXBUF, "CONFIGURATION ERROR! Oper block '%s': missing OperType %s",parameters[0],OperType);