summaryrefslogtreecommitdiff
path: root/src/xmpp/biboumi_component.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-11-07 14:43:07 +0100
committerlouiz’ <louiz@louiz.org>2016-11-07 14:43:07 +0100
commit7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59 (patch)
tree05c48f84e1fd90d6d811a4e73b67503dda45db60 /src/xmpp/biboumi_component.cpp
parent50d7590db426ce821148af769ea18d556e97f393 (diff)
downloadbiboumi-7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59.tar.gz
biboumi-7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59.tar.bz2
biboumi-7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59.tar.xz
biboumi-7376831bc8f6dbec8eaf4f4c0a6bba819a0a1e59.zip
Add get-irc-connection-info adhoc command
fix #3171
Diffstat (limited to 'src/xmpp/biboumi_component.cpp')
-rw-r--r--src/xmpp/biboumi_component.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index f3405df..4398562 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -63,6 +63,12 @@ BiboumiComponent::BiboumiComponent(std::shared_ptr<Poller> poller, const std::st
this->adhoc_commands_handler.add_command("disconnect-from-irc-server", {{&DisconnectUserFromServerStep1, &DisconnectUserFromServerStep2, &DisconnectUserFromServerStep3}, "Disconnect from the selected IRC servers", false});
this->adhoc_commands_handler.add_command("reload", {{&Reload}, "Reload biboumi’s configuration", true});
+ AdhocCommand get_irc_connection_info{{&GetIrcConnectionInfoStep1}, "Returns various information about your connection to this IRC server.", false};
+ if (!Config::get("fixed_irc_server", "").empty())
+ this->adhoc_commands_handler.add_command("get-irc-connection-info", get_irc_connection_info);
+ else
+ this->irc_server_adhoc_commands_handler.add_command("get-irc-connection-info", get_irc_connection_info);
+
#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);