Changeset 774


Ignore:
Timestamp:
09/27/06 12:28:51 (6 years ago)
Author:
wd
Message:

Allow the secret ninja "cgi:irc" hostmask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/ircd/addons/hostmask.c

    r773 r774  
    1919@DEPENDENCIES@: ircd 
    2020*/ 
     21 
     22#define CGI_IRC_SPECIAL_MASK "cgi:irc" 
    2123 
    2224static struct mdext_item *class_hostmask_mdi; 
     
    5355            /* verify the mask.  make sure it consists ONLY of valid 
    5456             * characters, and that it has multiple parts. */ 
    55             if (!istr_okay(ircd.maps.host, s) || strchr(s, '.') == NULL) 
     57            if (strcasecmp(s, CGI_IRC_SPECIAL_MASK) && 
     58                    (!istr_okay(ircd.maps.host, s) || 
     59                     strchr(s, '.') == NULL)) 
    5660                log_error("hostmask %s is invalid.", s); 
    5761            else 
     
    7276    mask = mdext(cli->conn->cls, class_hostmask_mdi); 
    7377    if (mask != NULL && *mask != '\0') { 
    74         if (!strcasecmp(mask, "cgi:irc")) { 
     78        if (!strcasecmp(mask, CGI_IRC_SPECIAL_MASK)) { 
    7579            /* Special CGI:IRC hack.  We take the password, if supplied, and 
    7680             * use it as a hostname (as long as it's valid) */ 
Note: See TracChangeset for help on using the changeset viewer.