Ignore:
Timestamp:
05/11/09 01:53:14 (3 years ago)
Author:
wd
Message:

Clean that up a bit, yech!

File:
1 edited

Legend:

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

    r836 r837  
    6868        sendto_one(cli, RPL_FMT(cli, ERR_NOSUCHCHANNEL), argv[1]); 
    6969        return COMMAND_WEIGHT_LOW; 
    70     } 
    71     if (!chanmode_isset(chan, npc_chanmode)) { 
     70    } else if (!chanmode_isset(chan, npc_chanmode)) { 
    7271        sendto_one(cli, RPL_FMT(cli, ERR_CANNOTSENDTOCHAN), argv[1]); 
    7372        return COMMAND_WEIGHT_LOW; 
     73    } else if (!CLIENT_MASTER(cli)) { 
     74        sendok = can_can_send_channel(cli, chan, argv[3]); 
     75        if (sendok > 0) { 
     76            sendto_one(cli, RPL_FMT(cli, sendok), chan->name); 
     77            return COMMAND_WEIGHT_MEDIUM; 
     78        } 
    7479    } 
    7580 
     
    8388 
    8489    if (MYCLIENT(cli)) { 
    85         if (!CLIENT_MASTER(cli)) { 
    86             sendok = can_can_send_channel(cli, chan, argv[3]); 
    87             if (sendok > 0) { 
    88                 sendto_one(cli, RPL_FMT(cli, sendok), chan->name); 
    89                 return COMMAND_WEIGHT_MEDIUM; 
    90             } 
    91         } 
    92  
    9390        /* calculate against: ":nick!user@host PRIVMSG #channel :blah (Sender)\r\n" 
    9491         * which is the most antiquated way of passing messages. */ 
Note: See TracChangeset for help on using the changeset viewer.