From cfebca4d7c46959fc490cb9c72363d4ac3ee0c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 23 Aug 2016 00:11:51 +0200 Subject: Only save the logs if recordHistory global config option is true --- src/bridge/bridge.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/bridge/bridge.hpp') diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index c26995f..0e1fbf4 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -13,6 +13,8 @@ #include #include +#include + class BiboumiComponent; class Poller; @@ -215,6 +217,9 @@ public: void trigger_on_irc_message(const std::string& irc_hostname, const IrcMessage& message); std::unordered_map>& get_irc_clients(); std::set get_chantypes(const std::string& hostname) const; +#ifdef USE_DATABASE + void set_record_history(const bool val); +#endif private: /** @@ -295,6 +300,9 @@ private: * TODO: send message history */ void generate_channel_join_for_resource(const Iid& iid, const std::string& resource); +#ifdef USE_DATABASE + bool record_history { true }; +#endif }; struct IRCNotConnected: public std::exception -- cgit v1.2.3