Blame


1 6e07fb41 2001-12-21 alex /*
2 6e07fb41 2001-12-21 alex * ngIRCd -- The Next Generation IRC Daemon
3 020c6d8b 2002-01-02 alex * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4 6e07fb41 2001-12-21 alex *
5 c7f07523 2002-12-12 alex * This program is free software; you can redistribute it and/or modify
6 c7f07523 2002-12-12 alex * it under the terms of the GNU General Public License as published by
7 c7f07523 2002-12-12 alex * the Free Software Foundation; either version 2 of the License, or
8 c7f07523 2002-12-12 alex * (at your option) any later version.
9 c7f07523 2002-12-12 alex * Please read the file COPYING, README and AUTHORS for more information.
10 6e07fb41 2001-12-21 alex *
11 c9540015 2003-01-03 alex * $Id: parse.h,v 1.10 2003/01/03 22:03:51 alex Exp $
12 6e07fb41 2001-12-21 alex *
13 c7f07523 2002-12-12 alex * IRC command parser and validator (header)
14 6e07fb41 2001-12-21 alex */
15 6e07fb41 2001-12-21 alex
16 6e07fb41 2001-12-21 alex
17 6e07fb41 2001-12-21 alex #ifndef __parse_h__
18 6e07fb41 2001-12-21 alex #define __parse_h__
19 6e07fb41 2001-12-21 alex
20 6e07fb41 2001-12-21 alex
21 6e07fb41 2001-12-21 alex typedef struct _REQUEST /* vgl. RFC 2812, 2.3 */
22 6e07fb41 2001-12-21 alex {
23 6e07fb41 2001-12-21 alex CHAR *prefix; /* Prefix */
24 6e07fb41 2001-12-21 alex CHAR *command; /* IRC-Befehl */
25 6e07fb41 2001-12-21 alex CHAR *argv[15]; /* Parameter (max. 15: 0..14) */
26 6e07fb41 2001-12-21 alex INT argc; /* Anzahl vorhandener Parameter */
27 6e07fb41 2001-12-21 alex } REQUEST;
28 6e07fb41 2001-12-21 alex
29 6e07fb41 2001-12-21 alex
30 17f7c6d3 2002-12-18 alex typedef struct _COMMAND
31 17f7c6d3 2002-12-18 alex {
32 17f7c6d3 2002-12-18 alex CHAR *name; /* command name */
33 c9540015 2003-01-03 alex BOOLEAN (*function) PARAMS(( CLIENT *Client, REQUEST *Request ));
34 17f7c6d3 2002-12-18 alex CLIENT_TYPE type; /* valid client types (bit mask) */
35 17f7c6d3 2002-12-18 alex LONG lcount, rcount; /* number of local and remote calls */
36 17f7c6d3 2002-12-18 alex LONG bytes; /* number of bytes created */
37 17f7c6d3 2002-12-18 alex } COMMAND;
38 17f7c6d3 2002-12-18 alex
39 17f7c6d3 2002-12-18 alex
40 c2f60abe 2002-05-27 alex GLOBAL BOOLEAN Parse_Request PARAMS((CONN_ID Idx, CHAR *Request ));
41 6e07fb41 2001-12-21 alex
42 17f7c6d3 2002-12-18 alex GLOBAL COMMAND *Parse_GetCommandStruct PARAMS(( VOID ));
43 6e07fb41 2001-12-21 alex
44 17f7c6d3 2002-12-18 alex
45 6e07fb41 2001-12-21 alex #endif
46 6e07fb41 2001-12-21 alex
47 6e07fb41 2001-12-21 alex
48 6e07fb41 2001-12-21 alex /* -eof- */