- for (;;) { /* Fake loop, that I can use break here --msa */
- if ((tmp = getfield(NULL, ':')) == NULL)
- break;
- DupString(aconf->host, tmp);
- if ((tmp = getfield(NULL, (aconf->status == CONF_KILL
- || aconf->status == CONF_IPKILL) ? '"' : ':')) == NULL)
- break;
- DupString(aconf->passwd, tmp);
- if ((tmp = getfield(NULL, ':')) == NULL)
- break;
- DupString(aconf->name, tmp);
- if ((tmp = getfield(NULL, ':')) == NULL)
- break;
- aconf->port = atoi(tmp);
- tmp = getfield(NULL, ':');
- if (aconf->status & CONF_ME) {
- if (!tmp) {
- Debug((DEBUG_FATAL, "Your M: line must have the Numeric, "
- "assigned to you by routing-com!\n"));
- ircd_log(L_WARNING, "Your M: line must have the Numeric, "
- "assigned to you by routing-com!\n");
- exit(-1);
- }
- SetYXXServerName(&me, atoi(tmp)); /* Our Numeric Nick */
- }
- else if (tmp)
- aconf->confClass = find_class(atoi(tmp));
- break;
+ if (!EmptyString(field_vector[1]))
+ DupString(aconf->host, field_vector[1]);
+
+ if (!EmptyString(field_vector[2]))
+ DupString(aconf->passwd, field_vector[2]);
+
+ if (field_count > 3 && !EmptyString(field_vector[3]))
+ DupString(aconf->name, field_vector[3]);
+
+ if (field_count > 4 && !EmptyString(field_vector[4]))
+ aconf->port = atoi(field_vector[4]);
+
+ if (field_count > 5 && !EmptyString(field_vector[5])) {
+ int n = atoi(field_vector[5]);
+ if (CONF_ME == (aconf->status & CONF_ME))
+ SetYXXServerName(&me, n); /* Our Numeric Nick */
+ else
+ aconf->confClass = find_class(n);