]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/parse.h
- new function Parse_GetCommandStruct().
[ngircd-alex.git] / src / ngircd / parse.h
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  * $Id: parse.h,v 1.9 2002/12/18 13:53:20 alex Exp $
12  *
13  * IRC command parser and validator (header)
14  */
15
16
17 #ifndef __parse_h__
18 #define __parse_h__
19
20
21 typedef struct _REQUEST                 /* vgl. RFC 2812, 2.3 */
22 {
23         CHAR *prefix;                   /* Prefix */
24         CHAR *command;                  /* IRC-Befehl */
25         CHAR *argv[15];                 /* Parameter (max. 15: 0..14) */
26         INT argc;                       /* Anzahl vorhandener Parameter */
27 } REQUEST;
28
29
30 typedef struct _COMMAND
31 {
32         CHAR *name;             /* command name */
33         BOOLEAN (*function)( CLIENT *Client, REQUEST *Request );
34         CLIENT_TYPE type;       /* valid client types (bit mask) */
35         LONG lcount, rcount;    /* number of local and remote calls */
36         LONG bytes;             /* number of bytes created */
37 } COMMAND;
38
39
40 GLOBAL BOOLEAN Parse_Request PARAMS((CONN_ID Idx, CHAR *Request ));
41
42 GLOBAL COMMAND *Parse_GetCommandStruct PARAMS(( VOID ));
43
44
45 #endif
46
47
48 /* -eof- */