452 |
|
MyFree(match_item->host); |
453 |
|
MyFree(match_item->reason); |
454 |
|
dlinkDelete(&conf->node, &nresv_items); |
455 |
– |
|
456 |
– |
if (conf->flags & CONF_FLAGS_TEMPORARY) |
457 |
– |
if ((m = dlinkFindDelete(&temporary_resv, conf)) != NULL) |
458 |
– |
free_dlink_node(m); |
459 |
– |
|
455 |
|
MyFree(conf); |
456 |
|
break; |
457 |
|
|
461 |
|
break; |
462 |
|
|
463 |
|
case CRESV_TYPE: |
469 |
– |
if (conf->flags & CONF_FLAGS_TEMPORARY) |
470 |
– |
if ((m = dlinkFindDelete(&temporary_resv, conf)) != NULL) |
471 |
– |
free_dlink_node(m); |
472 |
– |
|
464 |
|
MyFree(conf); |
465 |
|
break; |
466 |
|
|
1999 |
|
return aconf; |
2000 |
|
} |
2001 |
|
|
2011 |
– |
/* add_temp_line() |
2012 |
– |
* |
2013 |
– |
* inputs - pointer to struct ConfItem |
2014 |
– |
* output - none |
2015 |
– |
* Side effects - links in given struct ConfItem into |
2016 |
– |
* temporary *line link list |
2017 |
– |
*/ |
2018 |
– |
void |
2019 |
– |
add_temp_line(struct ConfItem *conf) |
2020 |
– |
{ |
2021 |
– |
if ((conf->type == NRESV_TYPE) || (conf->type == CRESV_TYPE)) |
2022 |
– |
{ |
2023 |
– |
conf->flags |= CONF_FLAGS_TEMPORARY; |
2024 |
– |
dlinkAdd(conf, make_dlink_node(), &temporary_resv); |
2025 |
– |
} |
2026 |
– |
} |
2027 |
– |
|
2002 |
|
/* cleanup_tklines() |
2003 |
|
* |
2004 |
|
* inputs - NONE |
2011 |
|
{ |
2012 |
|
hostmask_expire_temporary(); |
2013 |
|
expire_tklines(&xconf_items); |
2014 |
< |
expire_tklines(&temporary_resv); |
2014 |
> |
expire_tklines(&nresv_items); |
2015 |
> |
expire_tklines(&resv_channel_list); |
2016 |
|
} |
2017 |
|
|
2018 |
|
/* expire_tklines() |
2037 |
|
|
2038 |
|
if (conf->type == XLINE_TYPE) |
2039 |
|
{ |
2065 |
– |
if (!IsConfTemporary(conf)) |
2066 |
– |
continue; |
2067 |
– |
|
2040 |
|
xconf = (struct MatchItem *)map_to_conf(conf); |
2041 |
< |
if (xconf->hold <= CurrentTime) |
2041 |
> |
if (xconf->hold && xconf->hold <= CurrentTime) |
2042 |
|
{ |
2043 |
|
if (ConfigFileEntry.tkline_expire_notices) |
2044 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
2049 |
|
else if (conf->type == NRESV_TYPE) |
2050 |
|
{ |
2051 |
|
nconf = (struct MatchItem *)map_to_conf(conf); |
2052 |
< |
if (nconf->hold <= CurrentTime) |
2052 |
> |
if (nconf->hold && nconf->hold <= CurrentTime) |
2053 |
|
{ |
2054 |
|
if (ConfigFileEntry.tkline_expire_notices) |
2055 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
2056 |
|
"Temporary RESV for [%s] expired", conf->name); |
2085 |
– |
dlinkDelete(ptr, tklist); |
2086 |
– |
free_dlink_node(ptr); |
2057 |
|
delete_conf_item(conf); |
2058 |
|
} |
2059 |
|
} |
2060 |
|
else if (conf->type == CRESV_TYPE) |
2061 |
|
{ |
2062 |
< |
cconf = (struct ResvChannel *)map_to_conf(conf); |
2063 |
< |
if (cconf->hold <= CurrentTime) |
2062 |
> |
cconf = ptr->data; |
2063 |
> |
if (cconf->hold && cconf->hold <= CurrentTime) |
2064 |
|
{ |
2065 |
|
if (ConfigFileEntry.tkline_expire_notices) |
2066 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
2295 |
|
{ |
2296 |
|
/* temporary (r)xlines are also on |
2297 |
|
* the (r)xconf items list */ |
2298 |
< |
if (conf->flags & CONF_FLAGS_TEMPORARY) |
2298 |
> |
aconf = map_to_conf(conf); |
2299 |
> |
if (aconf->hold) |
2300 |
|
continue; |
2301 |
|
|
2302 |
|
delete_conf_item(conf); |