00001 /* +------------------------------------+ 00002 * | Inspire Internet Relay Chat Daemon | 00003 * +------------------------------------+ 00004 * 00005 * Inspire is copyright (C) 2002-2004 ChatSpike-Dev. 00006 * E-mail: 00007 * <brain@chatspike.net> 00008 * <Craig@chatspike.net> 00009 * 00010 * Written by Craig Edwards, Craig McLure, and others. 00011 * This program is free but copyrighted software; see 00012 * the file COPYING for details. 00013 * 00014 * --------------------------------------------------- 00015 */ 00016 00017 #ifndef __CTABLES_H__ 00018 #define __CTABLES_H__ 00019 00020 #include "inspircd_config.h" 00021 #include <deque> 00022 00023 class userrec; 00024 00025 /*typedef void (handlerfunc) (char**, int, userrec*);*/ 00026 00029 class command_t 00030 { 00031 public: 00034 std::string command; 00037 char flags_needed; 00040 int min_params; 00043 long use_count; 00046 long total_bytes; 00049 std::string source; 00050 00051 command_t(std::string cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara) 00052 { 00053 use_count = total_bytes = 0; 00054 source = "<core>"; 00055 } 00056 00057 virtual void Handle(char** parameters, int pcnt, userrec* user) = 0; 00058 00059 virtual ~command_t() {} 00060 }; 00061 00062 typedef std::deque<command_t*> command_table; 00063 00064 #endif 00065