Add AdhocCommandHandlers::add_command to simplify the usage of this class
And make things a little bit clearer
This commit is contained in:
@@ -15,9 +15,9 @@ const std::map<const std::string, const AdhocCommand>& AdhocCommandsHandler::get
|
||||
return this->commands;
|
||||
}
|
||||
|
||||
std::map<const std::string, const AdhocCommand>& AdhocCommandsHandler::get_commands()
|
||||
void AdhocCommandsHandler::add_command(std::string name, AdhocCommand command)
|
||||
{
|
||||
return this->commands;
|
||||
this->commands.emplace(std::make_pair(std::move(name), std::move(command)));
|
||||
}
|
||||
|
||||
XmlNode AdhocCommandsHandler::handle_request(const std::string& executor_jid, const std::string& to, XmlNode command_node)
|
||||
|
||||
Reference in New Issue
Block a user