ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/modules/core/m_server.c
(Generate patch)

Comparing ircd-hybrid-8/modules/core/m_server.c (file contents):
Revision 1321 by michael, Fri Mar 30 11:23:16 2012 UTC vs.
Revision 1383 by michael, Tue May 1 11:18:22 2012 UTC

# Line 215 | Line 215 | ms_server(struct Client *client_p, struc
215    char info[REALLEN + 1];
216    char *name;
217    struct Client *target_p;
218 <  struct ConfItem *conf;
219 <  struct MatchItem *match_item;
218 >  struct AccessItem *aconf;
219    int hop;
220    int hlined = 0;
221    int llined = 0;
# Line 294 | Line 293 | ms_server(struct Client *client_p, struc
293      if (target_p != client_p)
294        exit_client(target_p, &me, "Overridden");
295  
296 + //  ptr = client_p->confs.head;
297 +  aconf = map_to_conf(source_p->localClient->confs.head->data);
298 +
299    /* See if the newly found server is behind a guaranteed
300     * leaf. If so, close the link.
301     */
302 <  DLINK_FOREACH(ptr, leaf_items.head)
303 <  {
304 <    conf = ptr->data;
305 <
306 <    if (match(conf->name, client_p->name))
307 <    {
308 <      match_item = map_to_conf(conf);
307 <
308 <      if (match(match_item->host, name))
309 <        llined++;
310 <    }
311 <  }
312 <
313 <  DLINK_FOREACH(ptr, hub_items.head)
314 <  {
315 <    conf = ptr->data;
316 <
317 <    if (match(conf->name, client_p->name))
318 <    {
319 <      match_item = map_to_conf(conf);
320 <
321 <      if (match(match_item->host, name))
322 <        hlined++;
323 <    }
324 <  }
302 >  DLINK_FOREACH(ptr, aconf->leaf_list.head)
303 >    if (match(ptr->data, name))
304 >      ++llined;
305 >
306 >  DLINK_FOREACH(ptr, aconf->hub_list.head)
307 >    if (match(ptr->data, name))
308 >      ++hlined;
309  
310    /* Ok, this way this works is
311     *
# Line 420 | Line 404 | ms_sid(struct Client *client_p, struct C
404   {
405    char info[REALLEN + 1];
406    struct Client *target_p;
407 <  struct ConfItem *conf;
424 <  struct MatchItem *match_item;
407 >  struct AccessItem *aconf = NULL;
408    int hlined = 0;
409    int llined = 0;
410    dlink_node *ptr = NULL;
# Line 505 | Line 488 | ms_sid(struct Client *client_p, struct C
488    /* See if the newly found server is behind a guaranteed
489     * leaf. If so, close the link.
490     */
491 <  DLINK_FOREACH(ptr, leaf_items.head)
492 <  {
493 <    conf = ptr->data;
494 <
495 <    if (match(conf->name, client_p->name))
496 <    {
497 <      match_item = map_to_conf(conf);
515 <
516 <      if (match(match_item->host, parv[1]))
517 <        llined++;
518 <    }
519 <  }
491 >  DLINK_FOREACH(ptr, aconf->leaf_list.head)
492 >    if (match(ptr->data, parv[1]))
493 >      ++llined;
494 >
495 >  DLINK_FOREACH(ptr, aconf->hub_list.head)
496 >    if (match(ptr->data, parv[1]))
497 >      ++hlined;
498  
521  DLINK_FOREACH(ptr, hub_items.head)
522  {
523    conf = ptr->data;
524
525    if (match(conf->name, client_p->name))
526    {
527      match_item = map_to_conf(conf);
528
529      if (match(match_item->host, parv[1]))
530        hlined++;
531    }
532  }
499  
500    /* Ok, this way this works is
501     *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines