]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/ctables.h
More defines moved
[user/henk/code/inspircd.git] / include / ctables.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *     
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16  
17 #ifndef __CTABLES_H__
18 #define __CTABLES_H__
19
20 #include "inspircd_config.h"
21 #include <deque>
22
23 class userrec;
24
25 typedef void (handlerfunc) (char**, int, userrec*);
26
27 /** A structure that defines a command
28  */
29 class command_t
30 {
31  public:
32         /** Command name
33         */
34         char command[MAXBUF];
35         /** Handler function as in typedef
36         */
37         handlerfunc *handler_function; 
38         /** User flags needed to execute the command or 0
39          */
40         char flags_needed;
41         /** Minimum number of parameters command takes
42         */
43         int min_params;
44         /** used by /stats m
45          */
46         long use_count;
47         /** used by /stats m
48          */
49         long total_bytes;
50         /** used for resource tracking between modules
51          */
52         char source[MAXBUF];
53 };
54
55 typedef std::deque<command_t> command_table;
56
57 #endif
58