- type_invalid = true;
- for (j =0; j < ServerInstance->Config->ConfValueEnum(ServerInstance->Config->config_data, "type"); j++)
- {
- ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type", "name", j, TypeName, MAXBUF);
- ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type", "class", j, ClassName, MAXBUF);
-
- if (!strcmp(TypeName,OperType))
- {
- /* found this oper's opertype */
- if (!ServerInstance->IsNick(TypeName))
- {
- user->WriteNumeric(491, "%s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick.c_str());
- ServerInstance->SNO->WriteToSnoMask('o',"CONFIGURATION ERROR! Oper type '%s' contains invalid characters",OperType);
- ServerInstance->Logs->Log("OPER",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.", user->nick.c_str(), user->ident.c_str(), user->host.c_str());
- return CMD_FAILURE;
- }
- ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","host", j, HostName, MAXBUF);
- if (*HostName)
- user->ChangeDisplayedHost(HostName);
- if (*ClassName)
- {
- user->SetClass(ClassName);
- user->CheckClass();
- }
- found = true;
- type_invalid = false;
- break;
- }
- }