From ed8bdca0a0b72341faab25040b09c6f28110f127 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Apr 2023 10:19:32 +0300 Subject: SM_FindSession - obsoleted function removed --- include/m_chat_int.h | 1 - protocols/Discord/src/dispatch.cpp | 4 ++-- protocols/Discord/src/groupchat.cpp | 2 +- protocols/Discord/src/server.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 3698ef4203..ca737a06a7 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -262,7 +262,6 @@ struct CHAT_MANAGER CHAT_MANAGER(); SESSION_INFO* (*SM_CreateSession)(void); - SESSION_INFO* (*SM_FindSession)(const wchar_t *pszID, const char *pszModule); HICON (*SM_GetStatusIcon)(SESSION_INFO *si, USERINFO * ui); int (*SM_GetCount)(const char *pszModule); SESSION_INFO* (*SM_FindSessionByIndex)(const char *pszModule, int iItem); diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 149d0339a0..58a66bd90e 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -289,7 +289,7 @@ void CDiscordProto::OnCommandGuildMemberUpdated(const JSONNode &pRoot) continue; CMStringW wszOldNick; - SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); + SESSION_INFO *si = Chat_Find(it->wszUsername, m_szModuleName); if (si != nullptr) { USERINFO *ui = g_chatApi.UM_FindUser(si, wszUserId); if (ui != nullptr) @@ -337,7 +337,7 @@ void CDiscordProto::OnCommandRoleDeleted(const JSONNode &pRoot) if (it->pGuild != pGuild) continue; - SESSION_INFO *si = g_chatApi.SM_FindSession(it->wszUsername, m_szModuleName); + SESSION_INFO *si = Chat_Find(it->wszUsername, m_szModuleName); if (si != nullptr) { g_chatApi.TM_RemoveAll(&si->pStatuses); BuildStatusList(pGuild, si); diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index 146f8de1fe..67cf07d2fb 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -190,7 +190,7 @@ int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) if (pos != -1) { auto wszWord = wszText.Left(pos); wszWord.Trim(); - if (auto *si = g_chatApi.SM_FindSession(gch->si->ptszID, gch->si->pszModule)) { + if (auto *si = Chat_Find(gch->si->ptszID, gch->si->pszModule)) { USERINFO *pUser = nullptr; for (auto &U : si->getUserList()) diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index 839cf698b5..e9189112d3 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -67,7 +67,7 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest SESSION_INFO *si = nullptr; if (!pUser->bIsPrivate) { - si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName); + si = Chat_Find(pUser->wszUsername, m_szModuleName); if (si == nullptr) { debugLogA("message to unknown channel %lld ignored", pUser->channelId); return; -- cgit v1.2.3