summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_chat_int.h18
-rw-r--r--libs/win32/mir_app.libbin302584 -> 302710 bytes
-rw-r--r--libs/win64/mir_app.libbin302666 -> 302792 bytes
-rw-r--r--plugins/Scriver/src/chat_manager.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_tools.cpp4
-rw-r--r--protocols/Discord/src/dispatch.cpp2
-rw-r--r--protocols/Steam/src/steam_chats.cpp8
-rw-r--r--protocols/Telegram/src/groupchat.cpp4
-rw-r--r--src/mir_app/src/chat.h8
-rw-r--r--src/mir_app/src/chat_manager.cpp114
-rw-r--r--src/mir_app/src/chat_svc.cpp24
-rw-r--r--src/mir_app/src/chat_tools.cpp8
-rw-r--r--src/mir_app/src/mir_app.def4
-rw-r--r--src/mir_app/src/mir_app64.def4
-rw-r--r--src/mir_app/src/srmm_base.cpp4
15 files changed, 87 insertions, 117 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index a1e02fb065..31bf128e3b 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -137,10 +137,8 @@ struct MIR_APP_EXPORT LOGINFO : public MZeroedObject, public MNonCopyable
struct STATUSINFO
{
- wchar_t *pszGroup;
- int iIconIndex;
- int iStatus;
- STATUSINFO *next;
+ ptrW pszGroup;
+ int iIconIndex, iStatus;
};
struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
@@ -175,12 +173,12 @@ struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
CMsgDialog *pDlg;
USERINFO *pMe;
- STATUSINFO *pStatuses;
MODULEINFO *pMI;
SESSION_INFO *pParent;
- OBJLIST<USERINFO> arUsers;
OBJLIST<LOGINFO> arEvents;
+ OBJLIST<USERINFO> arUsers;
+ OBJLIST<STATUSINFO> arStatuses;
wchar_t pszLogFileName[MAX_PATH];
@@ -188,8 +186,8 @@ struct MIR_APP_EXPORT SESSION_INFO : public MZeroedObject, public MNonCopyable
return (pParent != nullptr) ? pParent->pMe : pMe;
}
- __forceinline STATUSINFO* getStatuses() const {
- return (pParent != nullptr) ? pParent->pStatuses : pStatuses;
+ __forceinline OBJLIST<STATUSINFO>& getStatuses() const {
+ return (pParent != nullptr) ? pParent->arStatuses : arStatuses;
}
__forceinline OBJLIST<USERINFO>& getUserList() {
@@ -279,8 +277,6 @@ struct CHAT_MANAGER
void (*MM_IconsChanged)(void);
BOOL (*MM_RemoveAll)(void);
- BOOL (*TM_RemoveAll)(STATUSINFO** pStatusList);
-
int (*UM_CompareItem)(const USERINFO *u1, const USERINFO *u2);
USERINFO* (*UM_AddUser)(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
USERINFO* (*UM_FindUser)(SESSION_INFO *si, const wchar_t *pszUID);
@@ -364,7 +360,7 @@ MIR_APP_DLL(void) Chat_EmptyHistory(SESSION_INFO *si);
MIR_APP_DLL(void) Chat_CreateMenu(HMENU hMenu, SESSION_INFO *si, const wchar_t *pszUID);
// retrieves user's role/status
-MIR_APP_DLL(STATUSINFO*) Chat_GetStatus(STATUSINFO *pStatuses, const USERINFO *pUser);
+MIR_APP_DLL(STATUSINFO*) Chat_GetStatus(SESSION_INFO *si, const USERINFO *pUser);
// creates a default description of a group chat event
// returns true if lin->ptszText is already utilized, you need to add it manually then otherwise
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 4e32f03a3f..604500c807 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index ce355311e6..60df7446ff 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/Scriver/src/chat_manager.cpp b/plugins/Scriver/src/chat_manager.cpp
index e2974b6d15..d56955d196 100644
--- a/plugins/Scriver/src/chat_manager.cpp
+++ b/plugins/Scriver/src/chat_manager.cpp
@@ -50,7 +50,7 @@ char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui)
if (!ui || !si)
return '\0';
- if (auto *ti = Chat_GetStatus(si->getStatuses(), ui)) {
+ if (auto *ti = Chat_GetStatus(si, ui)) {
switch (si->iStatusCount - ti->iIconIndex - 1) {
case 0: return '\0';
case 1: return '+';
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp
index ae57463343..e0995eba96 100644
--- a/plugins/TabSRMM/src/chat_tools.cpp
+++ b/plugins/TabSRMM/src/chat_tools.cpp
@@ -363,11 +363,9 @@ char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex)
if (iNickIndex)
*iNickIndex = 0;
- auto *pStatuses = si->getStatuses();
-
for (auto &ui : si->getUserList()) {
if (!mir_wstrcmp(ui->pszNick, ptszNick)) {
- if (auto *ti = Chat_GetStatus(pStatuses, ui)) {
+ if (auto *ti = Chat_GetStatus(si, ui)) {
if (iNickIndex)
*iNickIndex = ti->iIconIndex; // color table's index is not zero-based
return szIndicators[ti->iIconIndex];
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index 564e58f623..243ff79fe5 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -440,7 +440,7 @@ void CDiscordProto::OnCommandRoleDeleted(const JSONNode &pRoot)
SESSION_INFO *si = Chat_Find(it->wszUsername, m_szModuleName);
if (si != nullptr) {
- g_chatApi.TM_RemoveAll(&si->pStatuses);
+ si->arStatuses.destroy();
BuildStatusList(pGuild, si);
}
}
diff --git a/protocols/Steam/src/steam_chats.cpp b/protocols/Steam/src/steam_chats.cpp
index e59d39efe7..b46c514333 100644
--- a/protocols/Steam/src/steam_chats.cpp
+++ b/protocols/Steam/src/steam_chats.cpp
@@ -29,7 +29,7 @@ void CSteamProto::OnGetMyChats(const CChatRoomGetMyChatRoomGroupsResponse &reply
return;
std::map<MCONTACT, bool> chatIds;
- for (int i = 0; i < reply.n_chat_room_groups; i++) {
+ for (unsigned i = 0; i < reply.n_chat_room_groups; i++) {
auto *pGroup = reply.chat_room_groups[i]->group_summary;
CMStringW wszGrpName;
@@ -41,7 +41,7 @@ void CSteamProto::OnGetMyChats(const CChatRoomGetMyChatRoomGroupsResponse &reply
SESSION_INFO *pOwner = 0;
- for (int k = 0; k < pGroup->n_chat_rooms; k++) {
+ for (unsigned k = 0; k < pGroup->n_chat_rooms; k++) {
std::vector<uint64_t> ids;
auto *pChat = pGroup->chat_rooms[k];
@@ -53,11 +53,11 @@ void CSteamProto::OnGetMyChats(const CChatRoomGetMyChatRoomGroupsResponse &reply
auto *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, wszTitle);
if (pOwner == 0) {
- if (!si->pStatuses) {
+ if (si->arStatuses.getCount()) {
Chat_AddGroup(si, TranslateT("Owner"));
Chat_AddGroup(si, TranslateT("Participant"));
- for (int j = 0; j < pGroup->n_top_members; j++) {
+ for (unsigned j = 0; j < pGroup->n_top_members; j++) {
uint64_t iSteamId = AccountIdToSteamId(pGroup->top_members[j]);
CMStringW wszUserId(FORMAT, L"%lld", iSteamId), wszNick;
diff --git a/protocols/Telegram/src/groupchat.cpp b/protocols/Telegram/src/groupchat.cpp
index 2f503581aa..7e74a40976 100644
--- a/protocols/Telegram/src/groupchat.cpp
+++ b/protocols/Telegram/src/groupchat.cpp
@@ -46,7 +46,7 @@ void CTelegramProto::InitGroupChat(TG_USER *pUser, const wchar_t *pwszTitle)
if (pUser->bLoadMembers) {
pUser->m_si = si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, pwszTitle, pUser);
- if (!si->pStatuses) {
+ if (!si->arStatuses.getCount()) {
Chat_AddGroup(si, TranslateT("Creator"));
Chat_AddGroup(si, TranslateT("Admin"));
Chat_AddGroup(si, TranslateT("Participant"));
@@ -61,7 +61,7 @@ void CTelegramProto::InitGroupChat(TG_USER *pUser, const wchar_t *pwszTitle)
}
else {
pUser->m_si = si = Chat_NewSession(GCW_CHANNEL, m_szModuleName, wszId, pwszTitle, pUser);
- if (!si->pStatuses) {
+ if (!si->arStatuses.getCount()) {
Chat_AddGroup(si, TranslateT("SuperAdmin"));
Chat_AddGroup(si, TranslateT("Visitor"));
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index cbca7a51b3..41a4f67cac 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -100,10 +100,10 @@ BOOL SM_UserTyping(GCEVENT* gce);
SESSION_INFO* SM_FindSessionByContact(MCONTACT hContact);
SESSION_INFO* SM_FindSessionByIndex(const char *pszModule, int iItem);
-STATUSINFO* TM_AddStatus(STATUSINFO **ppStatusList, const wchar_t *pszStatus, int *iCount);
-STATUSINFO* TM_FindStatus(STATUSINFO *pStatusList, const wchar_t *pszStatus);
-uint16_t TM_StringToWord(STATUSINFO *pStatusList, const wchar_t *pszStatus);
-wchar_t* TM_WordToString(STATUSINFO *pStatusList, uint16_t Status);
+STATUSINFO* TM_AddStatus(SESSION_INFO *si, const wchar_t *pszStatus);
+STATUSINFO* TM_FindStatus(SESSION_INFO *si, const wchar_t *pszStatus);
+uint16_t TM_StringToWord(SESSION_INFO *si, const wchar_t *pszStatus);
+wchar_t* TM_WordToString(SESSION_INFO *si, uint16_t Status);
USERINFO* UM_AddUser(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
BOOL UM_RemoveAll(SESSION_INFO *si);
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 9b12ed1a45..8d3a1b8007 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -61,7 +61,8 @@ static int CompareEvents(const LOGINFO *p1, const LOGINFO *p2)
SESSION_INFO::SESSION_INFO() :
arUsers(10, CompareUser),
- arEvents(10, CompareEvents)
+ arEvents(10, CompareEvents),
+ arStatuses(1)
{
iLastEvent = MAXINT/2;
}
@@ -136,8 +137,8 @@ void SM_FreeSession(SESSION_INFO *si)
}
UM_RemoveAll(si);
- g_chatApi.TM_RemoveAll(&si->pStatuses);
+ si->arStatuses.destroy();
si->arEvents.destroy();
si->iStatusCount = 0;
@@ -358,8 +359,7 @@ static HICON SM_GetStatusIcon(SESSION_INFO *si, USERINFO *ui)
if (!ui || !si)
return nullptr;
- auto *pStatuses = si->getStatuses();
- STATUSINFO *ti = TM_FindStatus(pStatuses, TM_WordToString(pStatuses, ui->Status));
+ STATUSINFO *ti = TM_FindStatus(si, TM_WordToString(si, ui->Status));
if (ti != nullptr)
return g_chatApi.hStatusIcons[ti->iIconIndex];
@@ -430,7 +430,7 @@ BOOL SM_GiveStatus(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszSt
if (si == nullptr)
return FALSE;
- USERINFO *ui = UM_GiveStatus(si, pszUID, TM_StringToWord(si->getStatuses(), pszStatus));
+ USERINFO *ui = UM_GiveStatus(si, pszUID, TM_StringToWord(si, pszStatus));
if (ui && si->pDlg)
si->pDlg->UpdateNickList();
return TRUE;
@@ -439,7 +439,7 @@ BOOL SM_GiveStatus(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszSt
BOOL SM_AssignStatus(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszStatus)
{
if (si != nullptr)
- if (USERINFO *ui = UM_SetStatus(si, pszUID, TM_StringToWord(si->getStatuses(), pszStatus))) {
+ if (USERINFO *ui = UM_SetStatus(si, pszUID, TM_StringToWord(si, pszStatus))) {
if (si->pDlg)
si->pDlg->UpdateNickList();
return TRUE;
@@ -464,7 +464,7 @@ BOOL SM_TakeStatus(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszSt
if (si == nullptr)
return FALSE;
- USERINFO *ui = g_chatApi.UM_TakeStatus(si, pszUID, TM_StringToWord(si->getStatuses(), pszStatus));
+ USERINFO *ui = g_chatApi.UM_TakeStatus(si, pszUID, TM_StringToWord(si, pszStatus));
if (ui && si->pDlg)
si->pDlg->UpdateNickList();
return TRUE;
@@ -644,89 +644,73 @@ static BOOL MM_RemoveAll(void)
// Status manager functions
// Necessary to keep track of what user statuses per window nicklist that is available
-STATUSINFO* TM_AddStatus(STATUSINFO **ppStatusList, const wchar_t *pszStatus, int *iCount)
+STATUSINFO* TM_AddStatus(SESSION_INFO *si, const wchar_t *pszStatus)
{
- if (!ppStatusList || !pszStatus)
+ if (!si || !pszStatus)
return nullptr;
- if (!TM_FindStatus(*ppStatusList, pszStatus)) {
- STATUSINFO *node = (STATUSINFO*)mir_calloc(sizeof(STATUSINFO));
- replaceStrW(node->pszGroup, pszStatus);
- node->iIconIndex = *iCount;
- while (node->iIconIndex > STATUSICONCOUNT - 1)
- node->iIconIndex--;
-
- if (*ppStatusList == nullptr) { // list is empty
- node->iStatus = 1;
- *ppStatusList = node;
- node->next = nullptr;
- }
- else {
- node->iStatus = ppStatusList[0]->iStatus * 2;
- node->next = *ppStatusList;
- *ppStatusList = node;
- }
- return node;
+ if (TM_FindStatus(si, pszStatus))
+ return nullptr;
- }
- return nullptr;
+ auto *node = new STATUSINFO();
+ node->pszGroup = mir_wstrdup(pszStatus);
+ node->iIconIndex = si->iStatusCount;
+ while (node->iIconIndex > STATUSICONCOUNT - 1)
+ node->iIconIndex--;
+
+ auto &pList = si->getStatuses();
+ if (pList.getCount() == 0) // list is empty
+ node->iStatus = 1;
+ else
+ node->iStatus = pList[pList.getCount()-1].iStatus * 2;
+
+ pList.insert(node);
+ si->bIsDirty = true;
+ si->iStatusCount++;
+ return node;
}
-STATUSINFO* TM_FindStatus(STATUSINFO *pStatusList, const wchar_t *pszStatus)
+STATUSINFO* TM_FindStatus(SESSION_INFO *si, const wchar_t *pszStatus)
{
- if (!pStatusList || !pszStatus)
+ if (!si || !pszStatus)
return nullptr;
- for (auto *pTemp = pStatusList; pTemp != nullptr; pTemp = pTemp->next)
- if (mir_wstrcmpi(pTemp->pszGroup, pszStatus) == 0)
- return pTemp;
+ for (auto &it: si->getStatuses())
+ if (mir_wstrcmpi(it->pszGroup, pszStatus) == 0)
+ return it;
return nullptr;
}
-uint16_t TM_StringToWord(STATUSINFO *pStatusList, const wchar_t *pszStatus)
+uint16_t TM_StringToWord(SESSION_INFO *si, const wchar_t *pszStatus)
{
- if (!pStatusList || !pszStatus)
+ if (!si || !pszStatus)
return 0;
- for (STATUSINFO *pTemp = pStatusList; pTemp != nullptr; pTemp = pTemp->next) {
- if (mir_wstrcmpi(pTemp->pszGroup, pszStatus) == 0)
- return pTemp->iStatus;
+ auto &pList = si->getStatuses();
+ for (auto &it : pList)
+ if (mir_wstrcmpi(it->pszGroup, pszStatus) == 0)
+ return it->iStatus;
+
+ if (pList.getCount())
+ return pList[pList.getCount()-1].iStatus;
- if (pTemp->next == nullptr)
- return pStatusList->iStatus;
- }
return 0;
}
-wchar_t* TM_WordToString(STATUSINFO *pStatusList, uint16_t Status)
+wchar_t* TM_WordToString(SESSION_INFO *si, uint16_t Status)
{
- if (!pStatusList)
+ if (!si)
return nullptr;
- for (auto *pTemp = pStatusList; pTemp != nullptr; pTemp = pTemp->next) {
- if (pTemp->iStatus & Status) {
- Status -= pTemp->iStatus;
+ for (auto &it : si->getStatuses())
+ if (it->iStatus & Status) {
+ Status -= it->iStatus;
if (Status == 0)
- return pTemp->pszGroup;
+ return it->pszGroup;
}
- }
- return nullptr;
-}
-
-static BOOL TM_RemoveAll(STATUSINFO **ppStatusList)
-{
- if (!ppStatusList)
- return FALSE;
- while (*ppStatusList != nullptr) {
- STATUSINFO *pLast = ppStatusList[0]->next;
- mir_free(ppStatusList[0]->pszGroup);
- mir_free(*ppStatusList);
- *ppStatusList = pLast;
- }
- *ppStatusList = nullptr;
- return TRUE;
+ return nullptr;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -770,8 +754,6 @@ static void ResetApi()
g_chatApi.MM_IconsChanged = ::MM_IconsChanged;
g_chatApi.MM_RemoveAll = ::MM_RemoveAll;
- g_chatApi.TM_RemoveAll = ::TM_RemoveAll;
-
g_chatApi.UM_AddUser = ::UM_AddUser;
g_chatApi.UM_CompareItem = ::UM_CompareItem;
g_chatApi.UM_FindUser = ::UM_FindUser;
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index e75c602692..4f941372a6 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -209,7 +209,7 @@ MIR_APP_DLL(SESSION_INFO*) Chat_NewSession(
SESSION_INFO *si = Chat_Find(ptszID, pszModule);
if (si != nullptr) {
UM_RemoveAll(si);
- g_chatApi.TM_RemoveAll(&si->pStatuses);
+ si->arStatuses.destroy();
lck.unlock();
si->iStatusCount = 0;
@@ -292,9 +292,9 @@ static void SetInitDone(SESSION_INFO *si)
return;
si->bInitDone = true;
- for (STATUSINFO *p = si->pStatuses; p; p = p->next)
- if (p->iIconIndex < STATUSICONCOUNT)
- p->iIconIndex = si->iStatusCount - p->iIconIndex - 1;
+ for (auto &it : si->arStatuses)
+ if (it->iIconIndex < STATUSICONCOUNT)
+ it->iIconIndex = si->iStatusCount - it->iIconIndex - 1;
}
static int RoomControlHandler(int iCommand, SESSION_INFO *si)
@@ -428,7 +428,7 @@ MIR_APP_DLL(int) Chat_Terminate(SESSION_INFO *si)
static void AddUser(SESSION_INFO *si, GCEVENT &gce)
{
- uint16_t status = TM_StringToWord(si->getStatuses(), gce.pszStatus.w);
+ uint16_t status = TM_StringToWord(si, gce.pszStatus.w);
USERINFO *ui = UM_AddUser(si, gce.pszUID.w, gce.pszNick.w, status);
if (ui == nullptr)
@@ -621,14 +621,10 @@ MIR_APP_DLL(int) Chat_AddGroup(SESSION_INFO *si, const wchar_t *wszText)
return 0;
mir_cslock lck(csChat);
- STATUSINFO *ti = TM_AddStatus(&si->pStatuses, wszText, &si->iStatusCount);
- if (ti) {
- si->iStatusCount++;
- si->bIsDirty = true;
- }
-
- if (g_chatApi.OnAddStatus)
+ STATUSINFO *ti = TM_AddStatus(si, wszText);
+ if (ti && g_chatApi.OnAddStatus)
g_chatApi.OnAddStatus(si, ti);
+
return 0;
}
@@ -680,9 +676,9 @@ MIR_APP_DLL(int) Chat_ChangeUserId(SESSION_INFO *si, const wchar_t *wszOldId, co
return 0;
}
-MIR_APP_DLL(STATUSINFO *) Chat_GetStatus(STATUSINFO *pStatuses, const USERINFO *ui)
+MIR_APP_DLL(STATUSINFO *) Chat_GetStatus(SESSION_INFO *si, const USERINFO *ui)
{
- return TM_FindStatus(pStatuses, TM_WordToString(pStatuses, ui->Status));
+ return TM_FindStatus(si, TM_WordToString(si, ui->Status));
}
MIR_APP_DLL(void*) Chat_GetUserInfo(SESSION_INFO *si)
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 168ac45746..64ab073211 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -867,9 +867,9 @@ void Chat_Serialize(SESSION_INFO *si)
return;
JSONNode pRoleList(JSON_ARRAY); pRoleList.set_name("roles");
- for (auto *p = si->pStatuses; p; p = p->next) {
+ for (auto &it: si->arStatuses) {
JSONNode role;
- role << JSONNode("id", p->iStatus) << JSONNode("name", p->pszGroup);
+ role << JSONNode("id", it->iStatus) << JSONNode("name", it->pszGroup.get());
pRoleList << role;
}
@@ -922,8 +922,7 @@ bool Chat_Unserialize(SESSION_INFO *si)
auto &pRoles = root["roles"];
for (auto it = pRoles.rbegin(); it != pRoles.rend(); ++it)
- if (auto *pStatus = TM_AddStatus(&si->pStatuses, (*it)["name"].as_mstring(), &si->iStatusCount))
- si->iStatusCount++;
+ TM_AddStatus(si, (*it)["name"].as_mstring());
for (auto &it : root["users"]) {
int iStatus = it["role"].as_int();
@@ -937,7 +936,6 @@ bool Chat_Unserialize(SESSION_INFO *si)
if (it["isMe"].as_bool())
si->pMe = ui;
ui->Status = iStatus;
- ui->Status |= si->pStatuses->iStatus;
if (g_chatApi.OnNewUser)
g_chatApi.OnNewUser(si, ui);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 393feb360d..c569d5a939 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -996,5 +996,5 @@ Proto_CanDeleteHistory @1118 NONAME
?ProcessToolbarHotkey@CSrmmBaseDialog@@AAEXH@Z @1127 NONAME
?iHistoryMode@Srmm@@3V?$CMOption@E@@A @1128 NONAME
?getConn@MWebSocket@@QBEPAXXZ @1129 NONAME
-?getStatuses@SESSION_INFO@@QBEPAUSTATUSINFO@@XZ @1130 NONAME
-?Chat_GetStatus@@YGPAUSTATUSINFO@@PAU1@PBUUSERINFO@@@Z @1131 NONAME
+?Chat_GetStatus@@YGPAUSTATUSINFO@@PAUSESSION_INFO@@PBUUSERINFO@@@Z @1130 NONAME
+?getStatuses@SESSION_INFO@@QBEAAU?$OBJLIST@USTATUSINFO@@@@XZ @1131 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 6bfd96a14a..e56b145990 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -996,5 +996,5 @@ Proto_CanDeleteHistory @1118 NONAME
?ProcessToolbarHotkey@CSrmmBaseDialog@@AEAAX_J@Z @1127 NONAME
?iHistoryMode@Srmm@@3V?$CMOption@E@@A @1128 NONAME
?getConn@MWebSocket@@QEBAPEAXXZ @1129 NONAME
-?getStatuses@SESSION_INFO@@QEBAPEAUSTATUSINFO@@XZ @1130 NONAME
-?Chat_GetStatus@@YAPEAUSTATUSINFO@@PEAU1@PEBUUSERINFO@@@Z @1131 NONAME
+?Chat_GetStatus@@YAPEAUSTATUSINFO@@PEAUSESSION_INFO@@PEBUUSERINFO@@@Z @1130 NONAME
+?getStatuses@SESSION_INFO@@QEBAAEAU?$OBJLIST@USTATUSINFO@@@@XZ @1131 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 729543cd94..734428756f 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -313,7 +313,7 @@ static void ProcessNickListHovering(const CCtrlListBox &listBox, int hoveredItem
wszBuf.Format(L"%s: %s\r\n%s: %s\r\n%s: %s",
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
- TranslateT("Status"), TM_WordToString(si->getStatuses(), ui->Status));
+ TranslateT("Status"), TM_WordToString(si, ui->Status));
ti.lpszText = wszBuf.GetBuffer();
}
@@ -339,7 +339,7 @@ void CSrmmBaseDialog::OnNickListTimer(CTimer *pTimer)
wszBuf.Format(L"<b>%s:</b>\t%s\n<b>%s:</b>\t%s\n<b>%s:</b>\t%s",
TranslateT("Nick"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
- TranslateT("Status"), TM_WordToString(m_si->getStatuses(), ui->Status));
+ TranslateT("Status"), TM_WordToString(m_si, ui->Status));
CLCINFOTIP ti = { sizeof(ti) };
Tipper_ShowTip(wszBuf, &ti);