diff options
author | George Hazan <ghazan@miranda.im> | 2019-01-11 21:22:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-01-11 21:22:38 +0300 |
commit | 524203126e0815eee6ce8e4cd7d3beb70ed9be94 (patch) | |
tree | 6a151f34c0a52c0800ac93f7337d2e8201e55ccc /protocols | |
parent | 2ed436c9c7338686de0a470baeae52072eca4ab2 (diff) |
unused constant removed
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/MinecraftDynmap/src/chat.cpp | 25 | ||||
-rw-r--r-- | protocols/Omegle/src/chat.cpp | 1 |
2 files changed, 11 insertions, 15 deletions
diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp index 96de40051e..7e267dda79 100644 --- a/protocols/MinecraftDynmap/src/chat.cpp +++ b/protocols/MinecraftDynmap/src/chat.cpp @@ -56,26 +56,23 @@ int MinecraftDynmapProto::OnChatEvent(WPARAM, LPARAM lParam) if(strcmp(hook->pszModule,m_szModuleName)) return 0; - switch(hook->iType) - { + switch(hook->iType) { case GC_USER_MESSAGE: - { - std::string text = mir_u2a_cp(hook->ptszText,CP_UTF8); - - // replace %% back to %, because chat automatically does this to sent messages - utils::text::replace_all(&text, "%%", "%"); + { + std::string text = mir_u2a_cp(hook->ptszText, CP_UTF8); - if (text.empty()) - break; + // replace %% back to %, because chat automatically does this to sent messages + utils::text::replace_all(&text, "%%", "%"); - // Outgoing message - debugLogA("**Chat - Outgoing message: %s", text.c_str()); - ForkThread(&MinecraftDynmapProto::SendMsgWorker, new std::string(text)); + if (text.empty()) + break; + // Outgoing message + debugLogA("**Chat - Outgoing message: %s", text.c_str()); + ForkThread(&MinecraftDynmapProto::SendMsgWorker, new std::string(text)); + } break; - } - case GC_USER_LEAVE: case GC_SESSION_TERMINATE: m_nick.clear(); SetStatus(ID_STATUS_OFFLINE); diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index 152966e8cd..0b37532c8d 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -175,7 +175,6 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam) }
break;
- case GC_USER_LEAVE:
case GC_SESSION_TERMINATE:
facy.nick_ = nullptr;
ForkThread(&OmegleProto::StopChatWorker, nullptr);
|