Changeset 54879ab for irc_commands.c
- Timestamp:
- 2006-01-21T22:31:10Z (19 years ago)
- Branches:
- master
- Children:
- 57c4fc0
- Parents:
- f73b969 (diff), f1d38f2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_commands.c
rf73b969 r54879ab 573 573 { "lilo", 1, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 574 574 { "rehash", 0, irc_cmd_rehash, IRC_CMD_OPER_ONLY }, 575 { "restart", 0, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 575 576 { "kill", 2, NULL, IRC_CMD_OPER_ONLY | IRC_CMD_TO_MASTER }, 576 577 { NULL } … … 579 580 void irc_exec( irc_t *irc, char *cmd[] ) 580 581 { 581 int i ;582 int i, n_arg; 582 583 583 584 if( !cmd[0] ) … … 587 588 if( g_strcasecmp( irc_commands[i].command, cmd[0] ) == 0 ) 588 589 { 590 /* There should be no typo in the next line: */ 591 for( n_arg = 0; cmd[n_arg]; n_arg ++ ); n_arg --; 592 589 593 if( irc_commands[i].flags & IRC_CMD_PRE_LOGIN && irc->status >= USTATUS_LOGGED_IN ) 590 594 { … … 599 603 irc_reply( irc, 481, ":Permission denied - You're not an IRC operator" ); 600 604 } 601 else if( !cmd[irc_commands[i].required_parameters])605 else if( n_arg < irc_commands[i].required_parameters ) 602 606 { 603 607 irc_reply( irc, 461, "%s :Need more parameters", cmd[0] );
Note: See TracChangeset
for help on using the changeset viewer.