X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommand_parse.cpp;h=d16f38a858b2434e004eaf4910ac57285627bca7;hb=22738bad54cb5fba35f31e545d2489ab1f2de5bd;hp=8d5bcbee41d59a8cdaf7dc861141d4e07d1de55d;hpb=e8c617b7749a18b353290471491e23b0573ebd7c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 8d5bcbee4..d16f38a85 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -12,17 +12,6 @@ */ #include "inspircd.h" -#include "xline.h" -#include "socketengine.h" -#include "socket.h" -#include "command_parse.h" -#include "exitcodes.h" - -/* Directory Searching for Unix-Only */ -#ifndef WIN32 -#include -#include -#endif int InspIRCd::PassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) { @@ -179,7 +168,7 @@ CmdResult CommandParser::CallHandler(const std::string &commandname, const std:: return CMD_INVALID; } -bool CommandParser::ProcessCommand(User *user, std::string &cmd) +bool CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) { std::vector command_p; irc::tokenstream tokens(cmd); @@ -204,10 +193,10 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd) /* Modify the user's penalty regardless of whether or not the command exists */ bool do_more = true; - if (IS_LOCAL(user) && !user->HasPrivPermission("users/flood/no-throttle")) + if (!user->HasPrivPermission("users/flood/no-throttle")) { // If it *doesn't* exist, give it a slightly heftier penalty than normal to deter flooding us crap - IS_LOCAL(user)->CommandFloodPenalty += cm != cmdlist.end() ? cm->second->Penalty * 1000 : 2000; + user->CommandFloodPenalty += cm != cmdlist.end() ? cm->second->Penalty * 1000 : 2000; } @@ -282,9 +271,7 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd) return true; /* activity resets the ping pending timer */ - LocalUser* luser = IS_LOCAL(user); - if (luser) - luser->nping = ServerInstance->Time() + luser->MyClass->GetPingTime(); + user->nping = ServerInstance->Time() + user->MyClass->GetPingTime(); if (cm->second->flags_needed) { @@ -362,12 +349,12 @@ Command::~Command() ServerInstance->Parser->RemoveCommand(this); } -bool CommandParser::ProcessBuffer(std::string &buffer,User *user) +bool CommandParser::ProcessBuffer(std::string &buffer,LocalUser *user) { if (!user || buffer.empty()) return true; - ServerInstance->Logs->Log("USERINPUT", DEBUG, "C[%s] I :%s %s", + ServerInstance->Logs->Log("USERINPUT", RAWIO, "C[%s] I :%s %s", user->uuid.c_str(), user->nick.c_str(), buffer.c_str()); return ProcessCommand(user,buffer); }