From 6776b827d243ec0e018eac8233c5df402030640e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 22 Aug 2016 00:38:44 +0200 Subject: Add a global configure ad-hoc command, with max history length --- src/xmpp/biboumi_component.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/xmpp/biboumi_component.cpp') diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp index 5c52494..9acccdb 100644 --- a/src/xmpp/biboumi_component.cpp +++ b/src/xmpp/biboumi_component.cpp @@ -63,11 +63,13 @@ BiboumiComponent::BiboumiComponent(std::shared_ptr poller, const std::st #ifdef USE_DATABASE AdhocCommand configure_server_command({&ConfigureIrcServerStep1, &ConfigureIrcServerStep2}, "Configure a few settings for that IRC server", false); + AdhocCommand configure_global_command({&ConfigureGlobalStep1, &ConfigureGlobalStep2}, "Configure a few settings", false); if (!Config::get("fixed_irc_server", "").empty()) - { this->adhoc_commands_handler.get_commands().emplace(std::make_pair("configure", - configure_server_command)); - } + configure_server_command)); + else + this->adhoc_commands_handler.get_commands().emplace(std::make_pair("configure", + configure_global_command)); #endif this->irc_server_adhoc_commands_handler.get_commands() = { -- cgit v1.2.3