summaryrefslogtreecommitdiff
path: root/src/bridge/bridge.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-08-26 17:55:19 +0200
committerlouiz’ <louiz@louiz.org>2018-09-29 20:04:42 +0200
commit7496138198347ae60979d6a05fa8f31d75c894f1 (patch)
tree5475cd4be947e863b9161dc2749096e522ba821b /src/bridge/bridge.cpp
parente560352fcf95ba70891d1a847973160c923fb702 (diff)
downloadbiboumi-7496138198347ae60979d6a05fa8f31d75c894f1.tar.gz
biboumi-7496138198347ae60979d6a05fa8f31d75c894f1.tar.bz2
biboumi-7496138198347ae60979d6a05fa8f31d75c894f1.tar.xz
biboumi-7496138198347ae60979d6a05fa8f31d75c894f1.zip
Only enable the force-connect feature with USE_DATABASE
Diffstat (limited to 'src/bridge/bridge.cpp')
-rw-r--r--src/bridge/bridge.cpp10
1 files changed, 10 insertions, 0 deletions
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<Database::Nick>();
IrcClient* irc = nullptr;
@@ -594,10 +595,15 @@ void Bridge::force_connect_to_server(const std::string& hostname, const std::str
std::set<Resource>& 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,