Changeset 749 for branches/ithildin-1.1


Ignore:
Timestamp:
06/12/06 00:52:02 (6 years ago)
Author:
wd
Message:

The channel_mode function now resets TS in some cases, making a TS check
after-the-fact somewhat useless. Move the TS check up and leave the mode
resetting to channel_mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ithildin-1.1/modules/ircd/commands/sjoin.c

    r722 r749  
    6060    client_t *cp; 
    6161    time_t ts = str_conv_int(argv[1], 0); 
    62     int changeok = 1; 
     62    bool changeok = true; 
    6363    int i; 
    6464    int mset = 0; 
     
    7878        chan->created = ts; 
    7979    }  
     80 
     81    /* Check TS before running channel_mode (which will reset TS in a 
     82     * variety of conditions).  All we need to know is whether or not to 
     83     * accept ops down below, channel_mode does the rest of the logic... */ 
     84    if (ts > chan->created) 
     85        changeok = false; 
     86 
    8087    /* handle mode changes.  we basically dump off the stuff to the mode 
    8188     * command handler.  We subtract four from argc (argv[0] is cmd, 
     
    8390     * arguments. */ 
    8491    channel_mode(NULL, srv, chan, ts, (argc - 4), argv + 3, 0); 
    85  
    86     /* check for ts changes. */ 
    87     /* we actually accept the older ts here.  if their ts is newer than 
    88      * ours we will quite likely have to undo changes and stuff. 
    89      * basically, we shouldn't trust any changes made to a channel whose ts 
    90      * isn't the same or lower than ours. */ 
    91     if (ts > chan->created) 
    92         changeok = 0; 
    93     else if (ts < chan->created) 
    94         chan->created = ts; 
    95     /* otherwise everything is the same and copacetic */ 
    9692 
    9793    /* now parse the list of joiners, and propogate our SJOIN out to others */ 
Note: See TracChangeset for help on using the changeset viewer.