1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 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 * ---------------------------------------------------
20 #include "inspircd_config.h"
23 #include <ext/hash_map>
29 #define nspace __gnu_cxx
36 /*typedef void (handlerfunc) (char**, int, userrec*);*/
38 /** A structure that defines a command
46 /** User flags needed to execute the command or 0
49 /** Minimum number of parameters command takes
58 /** used for resource tracking between modules
62 command_t(std::string cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara)
64 use_count = total_bytes = 0;
68 virtual void Handle(char** parameters, int pcnt, userrec* user) = 0;
70 virtual ~command_t() {}
73 typedef nspace::hash_map<std::string,command_t*> command_table;