diff options
author | Peter Powell <petpow@saberuk.com> | 2018-08-10 09:04:30 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-08-10 20:04:56 +0100 |
commit | 02838a09396a3626b61263791570e96324563fa0 (patch) | |
tree | 2978bacea011256f66f799bf5b8f91dc8590a398 /include | |
parent | 8b418f081f7ecbfdd51c84fae2298f927155fac0 (diff) |
Move message parsing to ProcessBuffer and fix edge cases in it.
Diffstat (limited to 'include')
-rw-r--r-- | include/command_parse.h | 9 |
1 files changed, 5 insertions, 4 deletions
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 |