]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Forward port of CullList and my bragging rights
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 6ec6f96a2b2172515beb6dbe08d273d14dd9b374..7a26f209ba0d537e949fecec536270cbbf95b543 100644 (file)
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include "inspircd_config.h"
 #include "inspircd.h"
-#include "inspircd_io.h"
+#include "configreader.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/errno.h>
@@ -26,15 +24,8 @@ using namespace std;
 #include <sys/utsname.h>
 #include <time.h>
 #include <string>
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
-#include <map>
 #include <sstream>
 #include <vector>
-#include <deque>
 #include <sched.h>
 #ifdef THREADED_DNS
 #include <pthread.h>
@@ -307,7 +298,7 @@ int CommandParser::LoopCall(command_t* fn, char **parameters, int pcnt, userrec
        return 1;
 }
 
-bool CommandParser::IsValidCommand(std::string &commandname, int pcnt, userrec * user)
+bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, userrec * user)
 {
        nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
 
@@ -330,7 +321,7 @@ bool CommandParser::IsValidCommand(std::string &commandname, int pcnt, userrec *
 
 // calls a handler function for a command
 
-bool CommandParser::CallHandler(std::string &commandname,char **parameters, int pcnt, userrec *user)
+bool CommandParser::CallHandler(const std::string &commandname,char **parameters, int pcnt, userrec *user)
 {
        nspace::hash_map<std::string,command_t*>::iterator n = cmdlist.find(commandname);
 
@@ -838,4 +829,3 @@ void CommandParser::SetupCommandTable()
        this->CreateCommand(new cmd_server);
        this->CreateCommand(new cmd_commands);
 }
-