X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/1cf798beb1b901e5ccb23b94a67bc8dbb3274a6d..8efff56fdf9f4ce4a3968c74162fed9d8d45c51a:/ircd/hostmask.c diff --git a/ircd/hostmask.c b/ircd/hostmask.c index 67d26b51..1a154130 100644 --- a/ircd/hostmask.c +++ b/ircd/hostmask.c @@ -631,7 +631,7 @@ delete_one_address_conf(const char *address, struct ConfItem *aconf) * 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; @@ -642,44 +642,17 @@ clear_out_address_conf(void) 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; @@ -696,7 +669,6 @@ clear_out_address_conf_bans(void) } } - /* * show_iline_prefix() *