#define __CTABLES_H__
#include "inspircd_config.h"
-#include <map>
+
+#ifdef GCC3
+#include <ext/hash_map>
+#else
+#include <hash_map>
+#endif
+
+#ifdef GCC3
+#define nspace __gnu_cxx
+#else
+#define nspace std
+#endif
class userrec;
virtual ~command_t() {}
};
-typedef std::map<std::string,command_t*> command_table;
+typedef nspace::hash_map<std::string,command_t*> command_table;
#endif
#include "command_parse.h"
#include "ctables.h"
+#ifdef GCC3
+#define nspace __gnu_cxx
+#else
+#define nspace std
+#endif
+
+
extern InspIRCd* ServerInstance;
extern std::vector<Module*> modules;
bool CommandParser::IsValidCommand(std::string &commandname, int pcnt, userrec * user)
{
- std::map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
+ nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
if (n != cmdlist.end())
{
if ((pcnt>=n->second->min_params) && (n->second->source != "<core>"))
void CommandParser::CallHandler(std::string &commandname,char **parameters, int pcnt, userrec *user)
{
- std::map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
+ nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
if (n != cmdlist.end())
{
if (pcnt >= n->second->min_params)
return;
}
- std::map<std::string,command_t*>::iterator cm = cmdlist.find(xcommand);
+ nspace::hash_map<std::string,command_t*>::iterator cm = cmdlist.find(xcommand);
if (cm != cmdlist.end())
{
while (go_again)
{
go_again = false;
- for (std::map<std::string,command_t*>::iterator i = cmdlist.begin(); i != cmdlist.end(); i++)
+ for (nspace::hash_map<std::string,command_t*>::iterator i = cmdlist.begin(); i != cmdlist.end(); i++)
{
command_t* x = i->second;
if (x->source == std::string(source))