]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/command_parse.h
44f5946bcd95e562ffc6bf49315edaeb8dd76b9c
[user/henk/code/inspircd.git] / include / command_parse.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 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 __COMMAND_PARSE_H
18 #define __COMMAND_PARSE_H
19
20 #include <typeinfo>
21 #include <iostream>
22 #include <string>
23 #include "users.h"
24 #include "ctables.h"
25 #include "typedefs.h"
26  
27 class CommandParser : public classbase
28 {
29  private:
30         int ProcessParameters(char **command_p,char *parameters);
31         void ProcessCommand(userrec *user, std::string &cmd);
32         void SetupCommandTable();
33  public:
34         command_table cmdlist;
35
36         CommandParser();
37         bool CallHandler(const std::string &commandname,char **parameters, int pcnt, userrec *user);
38         bool IsValidCommand(const std::string &commandname, int pcnt, userrec * user);
39         int LoopCall(command_t *fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins);
40         void ProcessBuffer(std::string &buffer,userrec *user);
41         bool RemoveCommands(const char* source);
42         bool CreateCommand(command_t *f);
43 };
44
45 #endif