1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
17 #ifndef __COMMAND_PARSE_H
18 #define __COMMAND_PARSE_H
29 class CommandParser : public classbase
32 InspIRCd* ServerInstance;
34 int ProcessParameters(char **command_p,char *parameters);
35 void ProcessCommand(userrec *user, std::string &cmd);
36 void SetupCommandTable();
38 command_table cmdlist;
40 CommandParser(InspIRCd* Instance);
41 bool CallHandler(const std::string &commandname,const char** parameters, int pcnt, userrec *user);
42 bool IsValidCommand(const std::string &commandname, int pcnt, userrec * user);
43 int LoopCall(userrec* user, command_t* CommandObj, const char** parameters, int pcnt, unsigned int splithere, unsigned int extra);
44 int LoopCall(userrec* user, command_t* CommandObj, const char** parameters, int pcnt, unsigned int splithere);
45 void ProcessBuffer(std::string &buffer,userrec *user);
46 bool RemoveCommands(const char* source);
47 bool CreateCommand(command_t *f);