From 8c72d4c18d9c27ce1b5cd20f0cb98e5638c8becf Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 25 Nov 2021 02:57:11 -0500 Subject: dont print identify message to console mainly since i feel its only a matter of time before someone copy pastes it somewhere and itd be my fault also typedef -> using --- src/discord/websocket.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/discord/websocket.hpp') diff --git a/src/discord/websocket.hpp b/src/discord/websocket.hpp index e6a6489..26cd5d4 100644 --- a/src/discord/websocket.hpp +++ b/src/discord/websocket.hpp @@ -13,6 +13,9 @@ public: void SetUserAgent(std::string agent); + bool GetPrintMessages() const noexcept; + void SetPrintMessages(bool show) noexcept; + void Send(const std::string &str); void Send(const nlohmann::json &j); void Stop(); @@ -26,9 +29,9 @@ private: std::string m_agent; public: - typedef sigc::signal type_signal_open; - typedef sigc::signal type_signal_close; - typedef sigc::signal type_signal_message; + using type_signal_open = sigc::signal; + using type_signal_close = sigc::signal; + using type_signal_message = sigc::signal; type_signal_open signal_open(); type_signal_close signal_close(); @@ -38,4 +41,6 @@ private: type_signal_open m_signal_open; type_signal_close m_signal_close; type_signal_message m_signal_message; + + bool m_print_messages = true; }; -- cgit v1.2.3