diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-27 18:32:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-27 18:32:16 +0000 |
commit | 8b48b41245884894fdfe102287dcdeacb0ace9b5 (patch) | |
tree | 84f4d392ac81180c10a9172ae5d259b60157b063 /protocols/JabberG/src/jabber_chat.cpp | |
parent | 0a5d4c1026a8146e6213e531f22b7ec32d4fc61e (diff) |
fixes #1224 (Stoped using room name from bookmark)
git-svn-id: http://svn.miranda-ng.org/main/trunk@16782 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_chat.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 58a2038dab..6dd014257d 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -132,30 +132,33 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) gcw.ptszID = item->jid;
CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw);
- MCONTACT hContact = HContactFromJID(item->jid);
- if (hContact != NULL) {
- if (JABBER_LIST_ITEM *bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid))
+ GCSessionInfoBase *si = pci->SM_FindSession(item->jid, m_szModuleName);
+ if (si != NULL) {
+ item->hContact = si->hContact;
+
+ if (JABBER_LIST_ITEM *bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid)) {
if (bookmark->name) {
- ptrT myHandle(db_get_tsa(hContact, "CList", "MyHandle"));
+ ptrT myHandle(db_get_tsa(si->hContact, "CList", "MyHandle"));
if (myHandle == NULL)
- db_set_ts(hContact, "CList", "MyHandle", bookmark->name);
+ db_set_ts(si->hContact, "CList", "MyHandle", bookmark->name);
}
+ }
- ptrT tszNick(getTStringA(hContact, "MyNick"));
+ ptrT tszNick(getTStringA(si->hContact, "MyNick"));
if (tszNick != NULL) {
if (!mir_tstrcmp(tszNick, szNick))
- delSetting(hContact, "MyNick");
+ delSetting(si->hContact, "MyNick");
else
- setTString(hContact, "MyNick", item->nick);
+ setTString(si->hContact, "MyNick", item->nick);
}
- else setTString(hContact, "MyNick", item->nick);
+ else setTString(si->hContact, "MyNick", item->nick);
- ptrT passw(getTStringA(hContact, "Password"));
+ ptrT passw(getTStringA(si->hContact, "Password"));
if (lstrcmp_null(passw, item->password)) {
if (!item->password || !item->password[0])
- delSetting(hContact, "Password");
+ delSetting(si->hContact, "Password");
else
- setTString(hContact, "Password", item->password);
+ setTString(si->hContact, "Password", item->password);
}
}
@@ -350,7 +353,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason) gce.ptszText = XmlGetText(reason);
CallServiceSync(MS_GC_EVENT, (code == 200) ? SESSION_TERMINATE : SESSION_OFFLINE, (LPARAM)&gce);
- db_unset(HContactFromJID(item->jid), "CList", "Hidden");
+ db_unset(item->hContact, "CList", "Hidden");
item->bChatActive = FALSE;
if (m_bJabberOnline) {
|