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 8adff592 2005-03-19 fw * $Id: parse.h,v 1.11 2005/03/19 18:43:49 fw 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 8adff592 2005-03-19 fw #include "portab.h"
21 6e07fb41 2001-12-21 alex
22 6e07fb41 2001-12-21 alex typedef struct _REQUEST /* vgl. RFC 2812, 2.3 */
23 6e07fb41 2001-12-21 alex {
24 8adff592 2005-03-19 fw char *prefix; /* Prefix */
25 8adff592 2005-03-19 fw char *command; /* IRC-Befehl */
26 8adff592 2005-03-19 fw char *argv[15]; /* Parameter (max. 15: 0..14) */
27 8adff592 2005-03-19 fw int argc; /* Anzahl vorhandener Parameter */
28 6e07fb41 2001-12-21 alex } REQUEST;
29 6e07fb41 2001-12-21 alex
30 6e07fb41 2001-12-21 alex
31 17f7c6d3 2002-12-18 alex typedef struct _COMMAND
32 17f7c6d3 2002-12-18 alex {
33 8adff592 2005-03-19 fw char *name; /* command name */
34 8adff592 2005-03-19 fw bool (*function) PARAMS(( CLIENT *Client, REQUEST *Request ));
35 8adff592 2005-03-19 fw CLIENT_TYPE type; /* valid client types (bit mask) */
36 8adff592 2005-03-19 fw long lcount, rcount; /* number of local and remote calls */
37 8adff592 2005-03-19 fw long bytes; /* number of bytes created */
38 17f7c6d3 2002-12-18 alex } COMMAND;
39 17f7c6d3 2002-12-18 alex
40 17f7c6d3 2002-12-18 alex
41 8adff592 2005-03-19 fw GLOBAL bool Parse_Request PARAMS((CONN_ID Idx, char *Request ));
42 6e07fb41 2001-12-21 alex
43 8adff592 2005-03-19 fw GLOBAL COMMAND *Parse_GetCommandStruct PARAMS(( void ));
44 6e07fb41 2001-12-21 alex
45 17f7c6d3 2002-12-18 alex
46 6e07fb41 2001-12-21 alex #endif
47 6e07fb41 2001-12-21 alex
48 6e07fb41 2001-12-21 alex
49 6e07fb41 2001-12-21 alex /* -eof- */