diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-25 02:57:11 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-11-25 02:57:11 -0500 |
commit | 8c72d4c18d9c27ce1b5cd20f0cb98e5638c8becf (patch) | |
tree | 244f645e36250e103c54462091855aa78e8e3c20 /src/discord/websocket.cpp | |
parent | 0da913cd4a76aae1ca41abe5b1a51874c974d3aa (diff) | |
download | abaddon-portaudio-8c72d4c18d9c27ce1b5cd20f0cb98e5638c8becf.tar.gz abaddon-portaudio-8c72d4c18d9c27ce1b5cd20f0cb98e5638c8becf.zip |
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
Diffstat (limited to 'src/discord/websocket.cpp')
-rw-r--r-- | src/discord/websocket.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/discord/websocket.cpp b/src/discord/websocket.cpp index ff50cd3..c7e43e9 100644 --- a/src/discord/websocket.cpp +++ b/src/discord/websocket.cpp @@ -15,6 +15,14 @@ void Websocket::SetUserAgent(std::string agent) { m_agent = agent; } +bool Websocket::GetPrintMessages() const noexcept { + return m_print_messages; +} + +void Websocket::SetPrintMessages(bool show) noexcept { + m_print_messages = show; +} + void Websocket::Stop() { Stop(ix::WebSocketCloseConstants::kNormalClosureCode); } @@ -29,7 +37,8 @@ bool Websocket::IsOpen() const { } void Websocket::Send(const std::string &str) { - printf("sending %s\n", str.c_str()); + if (m_print_messages) + printf("sending %s\n", str.c_str()); m_websocket.sendText(str); } |