summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-10-13 23:47:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-10-13 23:47:14 +0300
commit27a552b8bf0f42af225e07b009d5b3e9c633e3fe (patch)
tree2a2b3204955b92e9cf87aed76a7033067a050ecd /include
parent31af9f2c6205e0517185f71c6c66f76d6425e2a5 (diff)
group chats:
- GC_SHAREDUSERS removed; - SESSION_INFO::pParent used instead to collect data about shared user info - fix for SESSION_INFO::pMe calculation - Discord chats now go offline when proto goes offline
Diffstat (limited to 'include')
-rw-r--r--include/m_chat.h1
-rw-r--r--include/m_chat_int.h13
2 files changed, 7 insertions, 7 deletions
diff --git a/include/m_chat.h b/include/m_chat.h
index d6d2e398ae..978e1e1860 100644
--- a/include/m_chat.h
+++ b/include/m_chat.h
@@ -133,7 +133,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define GC_ACKMSG 0x0020 // the protocol must acknowlege messages sent
#define GC_TYPNOTIF 0x0040 // enable typing notifications.
#define GC_CHANMGR 0x0080 // enable the 'channel settings' button
-#define GC_SHAREDUSERS 0x0100 // array of users is the same for all group chats
// Error messages
#define GC_ERROR 1 // An internal error occurred.
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index 154edc854e..472d08cf8c 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -103,11 +103,9 @@ struct MIR_APP_EXPORT GCModuleInfoBase : public MZeroedObject, public MNonCopyab
bool bBold, bItalics, bUnderline;
bool bColor, bBkgColor;
- bool bChanMgr, bAckMsg, bSharedUsers;
+ bool bChanMgr, bAckMsg;
int iMaxText;
-
- OBJLIST<USERINFO> arUsers; // for shared list of users
};
struct COMMANDINFO
@@ -180,15 +178,18 @@ struct MIR_APP_EXPORT GCSessionInfoBase : public MZeroedObject, public MNonCopya
USERINFO *pMe;
STATUSINFO *pStatuses;
MODULEINFO *pMI;
+ GCSessionInfoBase *pParent;
OBJLIST<USERINFO> arUsers;
wchar_t pszLogFileName[MAX_PATH];
+ __forceinline USERINFO* getMe() const
+ { return (pParent != nullptr) ? pParent->pMe : pMe;
+ }
+
__forceinline OBJLIST<USERINFO>& getUserList()
- {
- GCModuleInfoBase *mi = (GCModuleInfoBase*)pMI;
- return (mi->bSharedUsers) ? mi->arUsers : arUsers;
+ { return (pParent != nullptr) ? pParent->arUsers : arUsers;
}
};