command: removed CommandHandlerFunction typedef
The typedef CommandHandlerFunction is only used once. Move its type into the command struct.
This commit is contained in:
@@ -63,8 +63,6 @@
|
|||||||
*/
|
*/
|
||||||
#define COMMAND_ARGV_MAX (2+(TAG_NUM_OF_ITEM_TYPES*2))
|
#define COMMAND_ARGV_MAX (2+(TAG_NUM_OF_ITEM_TYPES*2))
|
||||||
|
|
||||||
typedef int (*CommandHandlerFunction) (struct client *, int, char **);
|
|
||||||
|
|
||||||
/* if min: -1 don't check args *
|
/* if min: -1 don't check args *
|
||||||
* if max: -1 no max args */
|
* if max: -1 no max args */
|
||||||
struct command {
|
struct command {
|
||||||
@@ -72,7 +70,7 @@ struct command {
|
|||||||
unsigned reqPermission;
|
unsigned reqPermission;
|
||||||
int min;
|
int min;
|
||||||
int max;
|
int max;
|
||||||
CommandHandlerFunction handler;
|
int (*handler)(struct client *client, int argc, char **argv);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* this should really be "need a non-negative integer": */
|
/* this should really be "need a non-negative integer": */
|
||||||
|
Reference in New Issue
Block a user