From 9ee588b23fd915255d2cea0c537e6938297dbe5b Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 18 Jan 2010 17:35:55 +0000 Subject: PreCommand/PostCommand are local-only hooks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12291 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 8d5bcbee4..61c23bf62 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -179,7 +179,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); @@ -282,9 +282,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,7 +360,7 @@ 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; -- cgit v1.2.3