[BACK]Return to parse.h CVS log [TXT][DIR] Up to [local] / ircnowd / src / ngircd

Annotation of ircnowd/src/ngircd/parse.h, Revision 1.1.1.1

1.1       tomglok     1: /*
                      2:  * ngIRCd -- The Next Generation IRC Daemon
                      3:  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
                      4:  *
                      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.
                     10:  */
                     11:
                     12: #ifndef __parse_h__
                     13: #define __parse_h__
                     14:
                     15: /**
                     16:  * @file
                     17:  * IRC command parser and validator (header)
                     18:  */
                     19:
                     20: #include "portab.h"
                     21:
                     22: /** A single IRC request ("command"). See RFC 2812 section 2.3 for details. */
                     23: typedef struct _REQUEST
                     24: {
                     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 */
                     29: } REQUEST;
                     30:
                     31: /** IRC command handling structure */
                     32: typedef struct _COMMAND
                     33: {
                     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 */
                     43: } COMMAND;
                     44:
                     45: GLOBAL bool Parse_Request PARAMS((CONN_ID Idx, char *Request ));
                     46:
                     47: GLOBAL COMMAND *Parse_GetCommandStruct PARAMS(( void ));
                     48:
                     49: #endif
                     50:
                     51: /* -eof- */

CVSweb