PennMUSH Community

Changeset 1296

Show
Ignore:
Timestamp:
09/30/08 06:25:09 (2 months ago)
Author:
shawnw
Message:

Removed broken attempt to convert a IPv4 address to IPv6 in access.c. Better solution: Fix your sitelock rules.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/trunk/src/access.c

    r1278 r1296  
    377377 
    378378  for (ap = access_top; ap; ap = ap->next) { 
    379     if (!(ap->can & ACS_SITELOCK) 
    380         && ((ap->can & ACS_REGEXP) 
    381             ? (qcomp_regexp_match(ap->re, hname) 
    382                || (p && qcomp_regexp_match(ap->re, p)) 
    383 #ifdef FORCE_IPV4 
    384                || qcomp_regexp_match(ip4_to_ip6(ap->re), hname) 
    385                || (p && qcomp_regexp_match(ip4_to_ip6(ap->re), p)) 
    386 #endif 
    387             ) 
    388             : (quick_wild(ap->host, hname) 
    389                || (p && quick_wild(ap->host, p)) 
    390 #ifdef FORCE_IPV4 
    391                || quick_wild(ip4_to_ip6(ap->host), hname) 
    392                || (p && quick_wild(ip4_to_ip6(ap->host), p)) 
    393 #endif 
    394             )) 
     379    if (ap->can & ACS_SITELOCK) 
     380      continue; 
     381    if ((ap->can & ACS_REGEXP) 
     382    ? (qcomp_regexp_match(ap->re, hname) 
     383       || (p && qcomp_regexp_match(ap->re, p))) 
     384    : (quick_wild(ap->host, hname) 
     385       || (p && quick_wild(ap->host, p))) 
    395386        && (ap->who == AMBIGUOUS || ap->who == who)) { 
    396387      /* Got one */ 
     
    447438  for (ap = access_top; ap; ap = ap->next) { 
    448439    (*rulenum)++; 
    449     if (!(ap->can & ACS_SITELOCK) 
    450         && ((ap->can & ACS_REGEXP) 
    451             ? (qcomp_regexp_match(ap->re, hname) 
    452                || (p && qcomp_regexp_match(ap->re, p)) 
    453 #ifdef FORCE_IPV4 
    454                || qcomp_regexp_match(ip4_to_ip6(ap->host), hname) 
    455                || (p && qcomp_regexp_match(ip4_to_ip6(ap->host), p)) 
    456 #endif 
    457             ) 
    458             : (quick_wild(ap->host, hname) 
    459                || (p && quick_wild(ap->host, p)) 
    460 #ifdef FORCE_IPV4 
    461                || quick_wild(ip4_to_ip6(ap->host), hname) 
    462                || (p && quick_wild(ip4_to_ip6(ap->host), p)) 
    463 #endif 
    464             )) 
     440    if (ap->can & ACS_SITELOCK) 
     441      continue; 
     442    if (((ap->can & ACS_REGEXP) 
     443     ? (qcomp_regexp_match(ap->re, hname) 
     444        || (p && qcomp_regexp_match(ap->re, p))) 
     445     : (quick_wild(ap->host, hname) 
     446        || (p && quick_wild(ap->host, p)))) 
    465447        && (ap->who == AMBIGUOUS || ap->who == who)) { 
    466448      /* Got one */