- 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->WriteServ("491 %s :Invalid oper type (oper types must follow the same syntax as nicknames)",user->nick);
- ServerInstance->SNO->WriteToSnoMask('o',"CONFIGURATION ERROR! Oper type '%s' contains invalid characters",OperType);
- ServerInstance->Log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but oper type erroneous.",user->nick,user->ident,user->host);
- 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;
- }
- }