summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-06-01 12:29:04 +0200
committerlouiz’ <louiz@louiz.org>2018-06-01 12:29:04 +0200
commit3a9cc78a2102172f1439f7c9767e8c20ce694e06 (patch)
tree13f49113289919b58018a2a285f2a79641362561 /src
parentd3eda68761d6b5f4394c41248ae95915d6e90ae2 (diff)
downloadbiboumi-3a9cc78a2102172f1439f7c9767e8c20ce694e06.tar.gz
biboumi-3a9cc78a2102172f1439f7c9767e8c20ce694e06.tar.bz2
biboumi-3a9cc78a2102172f1439f7c9767e8c20ce694e06.tar.xz
biboumi-3a9cc78a2102172f1439f7c9767e8c20ce694e06.zip
Make the global ad-hoc configure command available in fixed mode
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/biboumi_component.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index dbaf8a4..be34873 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -72,11 +72,16 @@ BiboumiComponent::BiboumiComponent(std::shared_ptr<Poller>& poller, const std::s
AdhocCommand configure_global_command({&ConfigureGlobalStep1, &ConfigureGlobalStep2}, "Configure a few settings", false);
if (!Config::get("fixed_irc_server", "").empty())
- this->adhoc_commands_handler.add_command("configure", configure_server_command);
+ {
+ this->adhoc_commands_handler.add_command("server-configure", configure_server_command);
+ this->adhoc_commands_handler.add_command("global-configure", configure_global_command);
+ }
else
- this->adhoc_commands_handler.add_command("configure", configure_global_command);
+ {
+ this->adhoc_commands_handler.add_command("configure", configure_global_command);
+ this->irc_server_adhoc_commands_handler.add_command("configure", configure_server_command);
+ }
- this->irc_server_adhoc_commands_handler.add_command("configure", configure_server_command);
this->irc_channel_adhoc_commands_handler.add_command("configure", {{&ConfigureIrcChannelStep1, &ConfigureIrcChannelStep2}, "Configure a few settings for that IRC channel", false});
#endif
}