From 02838a09396a3626b61263791570e96324563fa0 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 10 Aug 2018 09:04:30 +0100 Subject: Move message parsing to ProcessBuffer and fix edge cases in it. --- include/command_parse.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/command_parse.h b/include/command_parse.h index 8324e5e25..f5cb47620 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -34,10 +34,11 @@ class CoreExport CommandParser private: /** Process a command from a user. - * @param user The user to parse the command for - * @param cmd The command string to process + * @param user The user to parse the command for. + * @param command The name of the command. + * @param parameters The parameters to the command. */ - void ProcessCommand(LocalUser* user, std::string& cmd); + void ProcessCommand(LocalUser* user, std::string& command, Command::Params& parameters); /** Command list, a hash_map of command names to Command* */ @@ -116,7 +117,7 @@ class CoreExport CommandParser * @param buffer The buffer line to process * @param user The user to whom this line belongs */ - void ProcessBuffer(std::string &buffer,LocalUser *user); + void ProcessBuffer(LocalUser* user, const std::string& buffer); /** Add a new command to the commands hash * @param f The new Command to add to the list -- cgit v1.2.3