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

Comparing ircd-hybrid/trunk/src/hostmask.c (file contents):
Revision 2916 by michael, Sat Jan 25 21:09:18 2014 UTC vs.
Revision 2995 by michael, Tue Feb 18 21:16:17 2014 UTC

# Line 481 | Line 481 | find_conf_by_address(const char *name, s
481          {
482            arec = ptr->data;
483  
484 <          if (arec->type == (type & ~0x1) &&
484 >          if ((arec->type == type) &&
485                arec->precedence > hprecv &&
486                arec->masktype == HM_IPV6 &&
487                match_ipv6(addr, &arec->Mask.ipa.addr,
488                           arec->Mask.ipa.bits) &&
489 <              (type & 0x1 || !cmpfunc(arec->username, username)) &&
489 >              (!username || !cmpfunc(arec->username, username)) &&
490                (IsNeedPassword(arec->conf) || arec->conf->passwd == NULL ||
491                 match_conf_password(password, arec->conf)))
492            {
# Line 506 | Line 506 | find_conf_by_address(const char *name, s
506          {
507            arec = ptr->data;
508  
509 <          if (arec->type == (type & ~0x1) &&
509 >          if ((arec->type == type) &&
510                arec->precedence > hprecv &&
511                arec->masktype == HM_IPV4 &&
512                match_ipv4(addr, &arec->Mask.ipa.addr,
513                           arec->Mask.ipa.bits) &&
514 <              (type & 0x1 || !cmpfunc(arec->username, username)) &&
514 >              (!username || !cmpfunc(arec->username, username)) &&
515                (IsNeedPassword(arec->conf) || arec->conf->passwd == NULL ||
516                 match_conf_password(password, arec->conf)))
517            {
# Line 532 | Line 532 | find_conf_by_address(const char *name, s
532          DLINK_FOREACH(ptr, atable[hash_text(p)].head)
533          {
534            arec = ptr->data;
535 <          if ((arec->type == (type & ~0x1)) &&
535 >          if ((arec->type == type) &&
536              arec->precedence > hprecv &&
537              (arec->masktype == HM_HOST) &&
538              !cmpfunc(arec->Mask.hostname, name) &&
539 <            (type & 0x1 || !cmpfunc(arec->username, username)) &&
539 >            (!username || !cmpfunc(arec->username, username)) &&
540              (IsNeedPassword(arec->conf) || arec->conf->passwd == NULL ||
541               match_conf_password(password, arec->conf)))
542          {
# Line 554 | Line 554 | find_conf_by_address(const char *name, s
554      {
555        arec = ptr->data;
556  
557 <      if (arec->type == (type & ~0x1) &&
557 >      if (arec->type == type &&
558            arec->precedence > hprecv &&
559            arec->masktype == HM_HOST &&
560            !cmpfunc(arec->Mask.hostname, name) &&
561 <          (type & 0x1 || !cmpfunc(arec->username, username)) &&
561 >          (!username || !cmpfunc(arec->username, username)) &&
562            (IsNeedPassword(arec->conf) || arec->conf->passwd == NULL ||
563             match_conf_password(password, arec->conf)))
564        {
# Line 623 | Line 623 | find_dline_conf(struct irc_ssaddr *addr,
623   {
624    struct MaskItem *eline;
625  
626 <  eline = find_conf_by_address(NULL, addr, CONF_EXEMPT | 1, aftype,
627 <                               NULL, NULL, 1);
626 >  eline = find_conf_by_address(NULL, addr, CONF_EXEMPT, aftype, NULL, NULL, 1);
627    if (eline != NULL)
628      return eline;
629  
630 <  return find_conf_by_address(NULL, addr, CONF_DLINE | 1, aftype, NULL, NULL, 1);
630 >  return find_conf_by_address(NULL, addr, CONF_DLINE, aftype, NULL, NULL, 1);
631   }
632  
633   /* void add_conf_by_address(int, struct MaskItem *aconf)

Diff Legend

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