Changeset 777 for branches/ithildin-1.1


Ignore:
Timestamp:
09/29/06 04:09:24 (6 years ago)
Author:
wd
Message:
  • Fix PASS hostmask handling (clear the password after the client_connect

hook).

  • Fix bug where 005 numerics had an extra space.
Location:
branches/ithildin-1.1/modules/ircd
Files:
3 edited

Legend:

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

    r774 r777  
    5858                    (!istr_okay(ircd.maps.host, s) || 
    5959                     strchr(s, '.') == NULL)) 
    60                 log_error("hostmask %s is invalid.", s); 
    61             else 
     60                log_error("hostmask for class %s is invalid", cls->name); 
     61            else { 
    6262                strlcpy(mdext(cls, class_hostmask_mdi), s, HOSTLEN + 1); 
     63                log_debug("setting hostmask for class %s to %s", cls->name, 
     64                        mdext(cls, class_hostmask_mdi)); 
     65            } 
    6366        } 
    6467    } 
  • branches/ithildin-1.1/modules/ircd/client.c

    r772 r777  
    201201            ircd.stats.serv.unkclients--; 
    202202 
     203        } 
     204 
     205        cli->signon = cli->ts = me.now; 
     206        cli->hops = 0; /* our client, they're 0 hops from us <G> */ 
     207 
     208        /* only hook for local registration */ 
     209        hook_event(ircd.events.client_connect, cli); 
     210 
     211        /* clear the password after client_connect, assume that nothing else 
     212         * will need to hook it and use it anymore. */ 
     213        if (cp != NULL) { 
    203214            /* clean out their password */ 
    204215            if (cp->pass != NULL) { 
     
    207218            } 
    208219        } 
    209  
    210         cli->signon = cli->ts = me.now; 
    211         cli->hops = 0; /* our client, they're 0 hops from us <G> */ 
    212  
    213     } 
    214  
    215     /* do other work now.. */ 
    216     if (MYCLIENT(cli)) { 
    217         /* only hook for local registration */ 
    218         hook_event(ircd.events.client_connect, cli); 
    219220 
    220221        /* accounting stuff */ 
  • branches/ithildin-1.1/modules/ircd/support.c

    r776 r777  
    126126            slen = tc = 0; 
    127127        } 
    128         slen += sprintf(str + slen, " %s", token); 
     128         
     129        /* tricky code here to prevent sending an additional space at the 
     130         * beginning of the line when one is not needed. */ 
     131        slen += sprintf(str + slen, (slen ? " %s" : "%s"), token); 
    129132    } 
    130133    /* send remnants */ 
Note: See TracChangeset for help on using the changeset viewer.