From 7115aa3b7f22f95e5e614ffc74c467844c08d965 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 24 Feb 2015 16:28:30 +0100 Subject: Add a reload add-hoc command --- src/xmpp/adhoc_command.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/xmpp/adhoc_command.cpp') diff --git a/src/xmpp/adhoc_command.cpp b/src/xmpp/adhoc_command.cpp index e1bfc97..c20976a 100644 --- a/src/xmpp/adhoc_command.cpp +++ b/src/xmpp/adhoc_command.cpp @@ -3,6 +3,8 @@ #include +#include + using namespace std::string_literals; AdhocCommand::AdhocCommand(std::vector&& callbacks, const std::string& name, const bool admin_only): @@ -198,3 +200,13 @@ void DisconnectUserStep2(XmppComponent* xmpp_component, AdhocSession& session, X session.terminate(); } +void Reload(XmppComponent*, AdhocSession& session, XmlNode& command_node) +{ + ::reload_process(); + command_node.delete_all_children(); + XmlNode note("note"); + note["type"] = "info"; + note.set_inner("Configuration reloaded."); + note.close(); + command_node.add_child(std::move(note)); +} -- cgit v1.2.3