ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/conf.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/conf.c (file contents):
Revision 1623 by michael, Thu Nov 1 13:24:43 2012 UTC vs.
Revision 1628 by michael, Thu Nov 1 21:08:56 2012 UTC

# Line 452 | Line 452 | delete_conf_item(struct ConfItem *conf)
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  
# Line 466 | Line 461 | delete_conf_item(struct ConfItem *conf)
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  
# Line 2008 | Line 1999 | find_gline(struct Client *client_p)
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
# Line 2037 | Line 2011 | cleanup_tklines(void *notused)
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()
# Line 2062 | Line 2037 | expire_tklines(dlink_list *tklist)
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,
# Line 2077 | Line 2049 | expire_tklines(dlink_list *tklist)
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,
# Line 2325 | Line 2295 | clear_out_old_conf(void)
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)