2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * Please read the file COPYING, README and AUTHORS for more information.
17 * IRC command parser and validator (header)
22 /** A single IRC request ("command"). See RFC 2812 section 2.3 for details. */
23 typedef struct _REQUEST
25 char *prefix; /**< Prefix */
26 char *command; /**< IRC command */
27 char *argv[15]; /**< Parameters, at most 15 (0..14) */
28 int argc; /**< Number of given paramaters */
31 /** IRC command handling structure */
32 typedef struct _COMMAND
34 const char *name; /**< Command name */
35 bool (*function) PARAMS(( CLIENT *Client, REQUEST *Request ));
36 /**< Function to handle this command */
37 CLIENT_TYPE type; /**< Valid client types (bit mask) */
38 int min_argc; /**< Min parameters */
39 int max_argc; /**< Max parameters */
40 int penalty; /**< Penalty for this command */
41 long lcount, rcount; /**< Number of local and remote calls */
42 long bytes; /**< Number of bytes created */
45 GLOBAL bool Parse_Request PARAMS((CONN_ID Idx, char *Request ));
47 GLOBAL COMMAND *Parse_GetCommandStruct PARAMS(( void ));