]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
More tweaks
[user/henk/code/inspircd.git] / src / command_parse.cpp
index aaafe3e30bd1699ac8f0b1023c7646b70244cd32..d7c8aefe5ba931ba3fdbf12b01c6c3fae90fb0c1 100644 (file)
@@ -36,7 +36,7 @@
 #include "commands.h"
 #include "xline.h"
 #include "inspstring.h"
-#include "helperfuncs.h"
+
 #include "hashcomp.h"
 #include "socketengine.h"
 #include "userprocess.h"
@@ -48,8 +48,6 @@
 
 #define nspace __gnu_cxx
 
-extern time_t TIME;
-
 /* Special commands which may occur without registration of the user */
 cmd_user* command_user;
 cmd_nick* command_nick;
@@ -136,7 +134,7 @@ bool CommandParser::IsValidCommand(const std::string &commandname, int pcnt, use
                        {
                                if (n->second->flags_needed)
                                {
-                                       return ((user->HasPermission(commandname)) || (is_uline(user->server)));
+                                       return ((user->HasPermission(commandname)) || (ServerInstance->ULine(user->server)));
                                }
                                return true;
                        }
@@ -202,7 +200,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
                if (user)
                {
                        /* activity resets the ping pending timer */
-                       user->nping = TIME + user->pingmax;
+                       user->nping = ServerInstance->Time() + user->pingmax;
                        if (cm->second->flags_needed)
                        {
                                if (!user->IsModeSet(cm->second->flags_needed))
@@ -277,7 +275,7 @@ bool CommandParser::RemoveCommands(const char* source)
                        command_t* x = i->second;
                        if (x->source == std::string(source))
                        {
-                               log(DEBUG,"removecommands(%s) Removing dependent command: %s",x->source.c_str(),x->command.c_str());
+                               ServerInstance->Log(DEBUG,"removecommands(%s) Removing dependent command: %s",x->source.c_str(),x->command.c_str());
                                cmdlist.erase(i);
                                go_again = true;
                                break;
@@ -302,7 +300,7 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user)
 
        if (buffer.length())
        {
-               log(DEBUG,"CMDIN: %s %s",user->nick,buffer.c_str());
+               ServerInstance->Log(DEBUG,"CMDIN: %s %s",user->nick,buffer.c_str());
                this->ProcessCommand(user,buffer);
        }
 }
@@ -313,7 +311,7 @@ bool CommandParser::CreateCommand(command_t *f)
        if (cmdlist.find(f->command) == cmdlist.end())
        {
                cmdlist[f->command] = f;
-               log(DEBUG,"Added command %s (%lu parameters)",f->command.c_str(),(unsigned long)f->min_params);
+               ServerInstance->Log(DEBUG,"Added command %s (%lu parameters)",f->command.c_str(),(unsigned long)f->min_params);
                return true;
        }
        else return false;