Ignore:
Timestamp:
05/31/07 15:15:23 (5 years ago)
Author:
wd
Message:

Many more changes:

  • Moved the 'core' addon code into various places in the main ircd module.
  • Split channel/user modes out of channel.c/client.c and into chanmode.c/usermode.c respectively.
  • Added init/teardown routines for channel/usermodes.
  • Changed the INVIS and OPER macros to have longer(:/) and more descriptive names.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ithildin/modules/ircd/commands/who.c

    r579 r803  
    212212                break; 
    213213            case 'g': /* gcos field search */ 
    214                 if (!OPER(cli) || oarg >= argc) 
     214                if (!CLIENT_OPERATOR(cli) || oarg >= argc) 
    215215                    WHO_PARSE_SERROR(argv[0]); 
    216216                who_opts.gcos = argv[oarg++]; 
     
    224224                break; 
    225225            case 'i': /* IP address search */ 
    226                 if (!OPER(cli) || oarg >= argc) 
     226                if (!CLIENT_OPERATOR(cli) || oarg >= argc) 
    227227                    WHO_PARSE_SERROR(argv[0]); 
    228228                who_opts.ip = argv[oarg++]; 
     
    239239                    s++; 
    240240                } 
    241                 if (!OPER(cli)) /* restrict them to only +o */ 
     241                if (!CLIENT_OPERATOR(cli)) /* restrict them to only +o */ 
    242242                    who_opts.usermodes = (who_opts.usermodes & 
    243243                            ircd.umodes.modes['o'].mask); 
     
    325325static int who_check(client_t *cli, int showall) { 
    326326 
    327     if (INVIS(cli) && !showall) 
     327    if (CLIENT_INVISIBLE(cli) && !showall) 
    328328        return 0; /* can't see them.  sneak sneak. */ 
    329329    if (who_opts.flags.check_umode) { 
     
    460460                continue; /* don't show them */ 
    461461            sprintf(status, "%c%s%s", AWAYMSG(cp) != NULL ? 'G' : 'H', 
    462                     OPER(cp) ? "*" : (INVIS(cp) && OPER(cli) ? "%" : ""), 
     462                    CLIENT_OPERATOR(cp) ? "*" : 
     463                    (CLIENT_INVISIBLE(cp) && CLIENT_OPERATOR(cli) ? "%" : ""), 
    463464                    chanmode_getprefixes(who_opts.channel, cp)); 
    464465            sendto_one(cli, RPL_FMT(cli, RPL_WHOREPLY), 
     
    481482        if (cp != NULL && who_check(cp, 1)) { 
    482483            sprintf(status, "%c%s", AWAYMSG(cp) != NULL ? 'G' : 'H', 
    483                     OPER(cp) ? "*" : (INVIS(cp) && OPER(cli) ? "%" : "")); 
     484                    CLIENT_OPERATOR(cp) ? "*" : 
     485                    (CLIENT_INVISIBLE(cp) && CLIENT_OPERATOR(cli) ? "%" : "")); 
    484486            sendto_one(cli, RPL_FMT(cli, RPL_WHOREPLY), 
    485487                    who_opts.flags.show_chan ? who_first_visible(cli, cp) : 
     
    509511                } else { 
    510512                    sprintf(status, "%c%s%s", AWAYMSG(cp) != NULL ? 'G' : 'H', 
    511                             OPER(cp) ? "*" : (INVIS(cp) && 
    512                                 OPER(cli) ? "%" : ""), 
     513                            CLIENT_OPERATOR(cp) ? "*" : 
     514                            (CLIENT_INVISIBLE(cp) && 
     515                             CLIENT_OPERATOR(cli) ? "%" : ""), 
    513516                            chanmode_getprefixes(who_opts.channel, cp)); 
    514517                    sendto_one(cli, RPL_FMT(cli, RPL_WHOREPLY), 
     
    535538            } else { 
    536539                sprintf(status, "%c%s", AWAYMSG(cp) != NULL ? 'G' : 'H', 
    537                         OPER(cp) ? "*" : (INVIS(cp) && OPER(cli) ? "%" : "")); 
     540                        CLIENT_OPERATOR(cp) ? "*" : 
     541                        (CLIENT_INVISIBLE(cp) && 
     542                         CLIENT_OPERATOR(cli) ? "%" : "")); 
    538543                sendto_one(cli, RPL_FMT(cli, RPL_WHOREPLY), 
    539544                        who_opts.flags.show_chan ? who_first_visible(cli, cp) : 
Note: See TracChangeset for help on using the changeset viewer.