summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-24 10:19:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-24 10:19:32 +0300
commited8bdca0a0b72341faab25040b09c6f28110f127 (patch)
treec49f178d9220b5d0ca46f58d4f5f93fd69d968c6
parenta888cd98191904f5aa5e224bd8def5814248cffc (diff)
SM_FindSession - obsoleted function removed
-rw-r--r--include/m_chat_int.h1
-rw-r--r--protocols/Discord/src/dispatch.cpp4
-rw-r--r--protocols/Discord/src/groupchat.cpp2
-rw-r--r--protocols/Discord/src/server.cpp2
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;