From 9f974ab8617b6b7c19bac9e71d06de89d7e7bd03 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 19 Sep 2016 14:17:59 +0000 Subject: - struct GCSESSION died; - Chat_NewSession simply gets 5 parameters; - minor chat code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@17318 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_chat.cpp | 8 +------- protocols/JabberG/src/jabber_iqid.cpp | 14 +++----------- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 0f405da76c..5838b6e2e1 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -127,13 +127,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) sttRoleItems[i].translate(); ptrW szNick(JabberNickFromJID(item->jid)); - - GCSESSION gcw = {}; - gcw.iType = GCW_CHATROOM; - gcw.pszModule = m_szModuleName; - gcw.ptszName = szNick; - gcw.ptszID = item->jid; - Chat_NewSession(&gcw); + Chat_NewSession(GCW_CHATROOM, m_szModuleName, item->jid, szNick); GCSessionInfoBase *si = pci->SM_FindSession(item->jid, m_szModuleName); if (si != NULL) { diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index bbf2407010..b0be15fb1d 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -440,17 +440,9 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) else db_unset(hContact, "CList", "MyHandle"); if (isChatRoom(hContact)) { - GCSESSION gcw = {}; - gcw.iType = GCW_CHATROOM; - gcw.pszModule = m_szModuleName; - gcw.ptszID = jid; - gcw.ptszName = NEWWSTR_ALLOCA(jid); - - wchar_t *p = (wchar_t*)wcschr(gcw.ptszName, '@'); - if (p) - *p = 0; - - Chat_NewSession(&gcw); + wchar_t *wszTitle = NEWWSTR_ALLOCA(jid); + if (wchar_t *p = wcschr(wszTitle, '@')) *p = 0; + Chat_NewSession(GCW_CHATROOM, m_szModuleName, jid, wszTitle); db_unset(hContact, "CList", "Hidden"); chatRooms.insert((HANDLE)hContact); -- cgit v1.2.3