-/*
- * find_conf_entry
- *
- * - looks for a match on all given fields.
- */
-#if 0
-static struct ConfItem *find_conf_entry(struct ConfItem *aconf,
- unsigned int mask)
-{
- struct ConfItem *bconf;
- assert(0 != aconf);
-
- mask &= ~CONF_ILLEGAL;
-
- for (bconf = GlobalConfList; bconf; bconf = bconf->next) {
- if (!(bconf->status & mask) || (bconf->port != aconf->port))
- continue;
-
- if ((EmptyString(bconf->host) && !EmptyString(aconf->host)) ||
- (EmptyString(aconf->host) && !EmptyString(bconf->host)))
- continue;
- if (!EmptyString(bconf->host) && 0 != ircd_strcmp(bconf->host, aconf->host))
- continue;
-
- if ((EmptyString(bconf->passwd) && !EmptyString(aconf->passwd)) ||
- (EmptyString(aconf->passwd) && !EmptyString(bconf->passwd)))
- continue;
- if (!EmptyString(bconf->passwd) && (!IsDigit(*bconf->passwd) || bconf->passwd[1])
- && 0 != ircd_strcmp(bconf->passwd, aconf->passwd))
- continue;
-
- if ((EmptyString(bconf->name) && !EmptyString(aconf->name)) ||
- (EmptyString(aconf->name) && !EmptyString(bconf->name)))
- continue;
- if (!EmptyString(bconf->name) && 0 != ircd_strcmp(bconf->name, aconf->name))
- continue;
- break;
- }
- return bconf;
-}
-
-/*
- * If conf line is a class definition, create a class entry
- * for it and make the conf_line illegal and delete it.
- */
-void conf_add_class(const char* const* fields, int count)
-{
- if (count < 6)
- return;
- add_class(atoi(fields[1]), atoi(fields[2]), atoi(fields[3]),
- atoi(fields[4]), atoi(fields[5]));
-}
-
-void conf_add_listener(const char* const* fields, int count)
-{
- int is_server = 0;
- int is_hidden = 0;
-
- /*
- * need a port
- */
- if (count < 5 || EmptyString(fields[4]))
- return;
-
- if (!EmptyString(fields[3])) {
- const char* x = fields[3];
- if ('S' == ToUpper(*x))
- is_server = 1;
- ++x;
- if ('H' == ToUpper(*x))
- is_hidden = 1;
- }
- /* port vhost mask */
- add_listener(atoi(fields[4]), fields[2], fields[1], is_server, is_hidden);
-}
-
-void conf_add_admin(const char* const* fields, int count)
-{
- /*
- * if you have one, it MUST have 3 lines
- */
- if (count < 4) {
- log_write(LS_CONFIG, L_CRIT, 0, "Your A: line must have 4 fields!");
- return;
- }
- MyFree(localConf.location1);
- DupString(localConf.location1, fields[1]);
-
- MyFree(localConf.location2);
- DupString(localConf.location2, fields[2]);
-
- MyFree(localConf.contact);
- DupString(localConf.contact, fields[3]);
-}
-
-/*
- * conf_add_crule - Create expression tree from connect rule and add it
- * to the crule list
- */
-void conf_add_crule(const char* const* fields, int count, int type)
-{
- struct CRuleNode* node;
- assert(0 != fields);
-
- if (count < 4 || EmptyString(fields[1]) || EmptyString(fields[3]))
- return;
-
- if ((node = crule_parse(fields[3]))) {
- struct CRuleConf* p = (struct CRuleConf*) MyMalloc(sizeof(struct CRuleConf));
- assert(0 != p);
-
- DupString(p->hostmask, fields[1]);
- collapse(p->hostmask);
-
- DupString(p->rule, fields[3]);
-
- p->type = type;
- p->node = node;
- p->next = cruleConfList;
- cruleConfList = p;
- }
-}
-#endif
-