summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-19 14:17:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-19 14:17:59 +0000
commit9f974ab8617b6b7c19bac9e71d06de89d7e7bd03 (patch)
treeadfbe951d1c291fe0904a083d332889aa043f3ac /protocols/JabberG
parent0f37fbfbfe24563a6be07f9abd245374e66cb173 (diff)
- 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
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp8
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp14
2 files changed, 4 insertions, 18 deletions
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);