diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-02-24 16:28:30 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-02-24 16:28:30 +0100 |
commit | 7115aa3b7f22f95e5e614ffc74c467844c08d965 (patch) | |
tree | 05e3b4efd07a602591d9828d5f24fab6eb4bf86f /src/xmpp/adhoc_command.cpp | |
parent | 9837f611d97bccdb4bf46f042120c3cb8d3fe907 (diff) | |
download | biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.gz biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.bz2 biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.tar.xz biboumi-7115aa3b7f22f95e5e614ffc74c467844c08d965.zip |
Add a reload add-hoc command
Diffstat (limited to 'src/xmpp/adhoc_command.cpp')
-rw-r--r-- | src/xmpp/adhoc_command.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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 <bridge/bridge.hpp> +#include <utils/reload.hpp> + using namespace std::string_literals; AdhocCommand::AdhocCommand(std::vector<AdhocStep>&& 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)); +} |