Add a global configure ad-hoc command, with max history length

This commit is contained in:
louiz’
2016-08-22 00:38:44 +02:00
parent 992fa93895
commit 6776b827d2
6 changed files with 126 additions and 12 deletions
+5 -3
View File
@@ -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() = {