From 7496138198347ae60979d6a05fa8f31d75c894f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 26 Aug 2018 17:55:19 +0200 Subject: Only enable the force-connect feature with USE_DATABASE --- src/bridge/bridge.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 24959d1..40c1060 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -571,6 +571,7 @@ void Bridge::send_irc_channel_list_request(const Iid& iid, const std::string& iq void Bridge::force_connect_to_server(const std::string& hostname, const std::string& resource) { +#ifdef USE_DATABASE auto soptions = Database::get_irc_server_options(this->get_bare_jid(), hostname); const auto& nickname = soptions.col(); IrcClient* irc = nullptr; @@ -594,10 +595,15 @@ void Bridge::force_connect_to_server(const std::string& hostname, const std::str std::set& resources = it->second; resources.insert(resource); } +#else + (void)hostname; + (void)resource; +#endif } void Bridge::unforce_connect_to_server(const std::string& hostname, const std::string& resource) { +#ifdef USE_DATABASE IrcClient* irc = this->find_irc_client(hostname); if (!irc) return; @@ -618,6 +624,10 @@ void Bridge::unforce_connect_to_server(const std::string& hostname, const std::s { this->remove_resource_from_server(hostname, resource); } +#else + (void)hostname; + (void)resource; +#endif } bool Bridge::send_matching_channel_list(const ChannelList& channel_list, const ResultSetInfo& rs_info, -- cgit v1.2.3