* them, otherwise sets them as illegal.
*/
void
-clear_out_address_conf(void)
+clear_out_address_conf(enum aconf_category clear_type)
{
int i;
struct AddressRec **store_next;
store_next = &atable[i];
for (arec = atable[i]; arec; arec = arecn)
{
+ enum aconf_category cur_type;
arecn = arec->next;
- /* We keep the temporary K-lines and destroy the
- * permanent ones, just to be confusing :) -A1kmm */
- if(arec->aconf->flags & CONF_FLAGS_TEMPORARY ||
- (arec->type != CONF_CLIENT && arec->type != CONF_EXEMPTDLINE && arec->type != CONF_SECURE))
- {
- *store_next = arec;
- store_next = &arec->next;
- }
- else
- {
- arec->aconf->status |= CONF_ILLEGAL;
- if(!arec->aconf->clients)
- free_conf(arec->aconf);
- rb_free(arec);
- }
- }
- *store_next = NULL;
- }
-}
-void
-clear_out_address_conf_bans(void)
-{
- int i;
- struct AddressRec **store_next;
- struct AddressRec *arec, *arecn;
+ if (arec->type == CONF_CLIENT || arec->type == CONF_EXEMPTDLINE || arec->type == CONF_SECURE)
+ cur_type = AC_CONFIG;
+ else
+ cur_type = AC_BANDB;
- for (i = 0; i < ATABLE_SIZE; i++)
- {
- store_next = &atable[i];
- for (arec = atable[i]; arec; arec = arecn)
- {
- arecn = arec->next;
/* We keep the temporary K-lines and destroy the
* permanent ones, just to be confusing :) -A1kmm */
- if(arec->aconf->flags & CONF_FLAGS_TEMPORARY ||
- (arec->type == CONF_CLIENT || arec->type == CONF_EXEMPTDLINE || arec->type == CONF_SECURE))
+ if (arec->aconf->flags & CONF_FLAGS_TEMPORARY || cur_type != clear_type)
{
*store_next = arec;
store_next = &arec->next;
}
}
-
/*
* show_iline_prefix()
*