Include the Configure ad-hoc command on biboumi's JID for fixed_irc_server
Because a jid like “freenode.example.org” is both the JID for the configured IRC server, and biboumi’s JID. fix #3175
This commit is contained in:
@@ -61,9 +61,18 @@ BiboumiComponent::BiboumiComponent(std::shared_ptr<Poller> poller, const std::st
|
||||
{"reload", AdhocCommand({&Reload}, "Reload biboumi’s configuration", true)}
|
||||
};
|
||||
|
||||
#ifdef USE_DATABASE
|
||||
AdhocCommand configure_server_command({&ConfigureIrcServerStep1, &ConfigureIrcServerStep2}, "Configure a few settings for that IRC server", false);
|
||||
if (!Config::get("fixed_irc_server", "").empty())
|
||||
{
|
||||
this->adhoc_commands_handler.get_commands().emplace(std::make_pair("configure",
|
||||
configure_server_command));
|
||||
}
|
||||
#endif
|
||||
|
||||
this->irc_server_adhoc_commands_handler.get_commands() = {
|
||||
#ifdef USE_DATABASE
|
||||
{"configure", AdhocCommand({&ConfigureIrcServerStep1, &ConfigureIrcServerStep2}, "Configure a few settings for that IRC server", false)},
|
||||
{"configure", configure_server_command},
|
||||
#endif
|
||||
};
|
||||
this->irc_channel_adhoc_commands_handler.get_commands() = {
|
||||
|
||||
Reference in New Issue
Block a user