diff options
author | louiz’ <louiz@louiz.org> | 2016-08-22 00:38:44 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-08-22 00:38:44 +0200 |
commit | 6776b827d243ec0e018eac8233c5df402030640e (patch) | |
tree | 261c35a77dacc928270601ac56424cab82de5b59 /src/xmpp/biboumi_component.cpp | |
parent | 992fa938951558f4515145c9b82af0123c979a29 (diff) | |
download | biboumi-6776b827d243ec0e018eac8233c5df402030640e.tar.gz biboumi-6776b827d243ec0e018eac8233c5df402030640e.tar.bz2 biboumi-6776b827d243ec0e018eac8233c5df402030640e.tar.xz biboumi-6776b827d243ec0e018eac8233c5df402030640e.zip |
Add a global configure ad-hoc command, with max history length
Diffstat (limited to 'src/xmpp/biboumi_component.cpp')
-rw-r--r-- | src/xmpp/biboumi_component.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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> 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() = { |