Changeset 754 for branches/ithildin-1.1


Ignore:
Timestamp:
06/24/06 19:02:03 (6 years ago)
Author:
wd
Message:

Re-add missing support for bahamut's "TS" portion of SVSMODE.

File:
1 edited

Legend:

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

    r753 r754  
    4949    channel_t *chan; 
    5050    client_t *cp; 
     51    char **myargv; 
     52    int myargc; 
    5153 
    5254    if (check_channame(argv[1]) && (chan = find_channel(argv[1])) != NULL) { 
     
    5961         * and treat everything else as a real client mode. */ 
    6062 
    61         if (argc == 4 && !strcmp(argv[2], "+d")) { 
    62             /* this is so dumb */ 
    63             SVSID(cp) = str_conv_int(argv[3], 0); 
    64         } else if (MYCLIENT(cp)) 
     63        /* They may send a ts along first.  We must skip this. */ 
     64        if (isdigit(*argv[2])) { 
     65            myargv = argv + 3; /* skip to argv[3] */ 
     66            myargc = argc - 3; 
     67        } else { 
     68            myargv = argv + 2; 
     69            myargc = argc - 2; 
     70        } 
     71 
     72        if (myargc == 2 && (!strcmp(myargv[0], "+d") || 
     73                    !strcmp(myargv[0], "+T"))) { 
     74            if (!strcmp(argv[0], "+d")) 
     75                /* this is so dumb */ 
     76                SVSID(cp) = str_conv_int(myargv[1], 0); 
     77 
     78            sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 
     79                    "%s %s", myargv[0], myargv[1]); 
     80            return; 
     81        } 
     82        if (MYCLIENT(cp)) 
    6583            /* Is this our client?  If so do the usermode thing.  Otherwise 
    6684             * just pass along the command, we expect a MODE back when it is 
    6785             * processed by the user's server. */ 
    68             user_mode(cp, cp, argc - 3, argv + 3, true); 
     86            user_mode(NULL, cp, myargc, myargv, true); 
    6987 
    70         /* XXX: For modes with arguments (none exist - yet) we do not 
    71          * support the idea well.  What we really need to do and don't is to 
    72          * tack on all of argv.. broken. */ 
    73         if (argc > 3) 
    74             sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 
    75                     "%s %s", argv[2], argv[3]); 
    76         else 
    77             sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", 
    78                     "%s", argv[2]); 
     88        sendto_serv_butone(sptr, cli, srv, cp->nick, "SVSMODE", "%s", 
     89                myargv[0]); 
    7990    } 
    8091} 
Note: See TracChangeset for help on using the changeset viewer.