Changeset 836 for branches/ithildin-1.1
- Timestamp:
- 05/11/09 01:51:43 (3 years ago)
- File:
-
- 1 edited
-
branches/ithildin-1.1/modules/ircd/commands/npc.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/commands/npc.c
r835 r836 48 48 */ 49 49 CLIENT_COMMAND(npc, 3, 3, COMMAND_FL_REGISTERED) { 50 static client_t fake_client; 51 50 52 bool action = !strcasecmp(argv[0], NPC_ACTION_COMMAND); 51 53 channel_t *chan = find_channel(argv[1]); 52 static client_t fake_client;54 int sendok = CLIENT_CHECK_OK; 53 55 size_t message_space = 512; 54 56 size_t message_length = 0; … … 76 78 sendto_one(cli, "NOTICE", ":NPC nickname %s is too long (maximum is %d letters)", 77 79 argv[2], NICKLEN - 2); 78 return COMMAND_WEIGHT_ NONE;80 return COMMAND_WEIGHT_LOW; 79 81 } 80 82 snprintf(fake_client.nick, NICKLEN, "%s", argv[2]); 81 83 82 84 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 83 93 /* calculate against: ":nick!user@host PRIVMSG #channel :blah (Sender)\r\n" 84 94 * which is the most antiquated way of passing messages. */ … … 96 106 "was too long. Please remove %u characters to send it.", 97 107 argv[3], message_length - message_space); 98 return COMMAND_WEIGHT_ LOW;108 return COMMAND_WEIGHT_MEDIUM; 99 109 } 100 110 }
Note: See TracChangeset
for help on using the changeset viewer.
