summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/src/jabber_chat.cpp')
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index 6c2da6e726..20c3d65d6d 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -333,15 +333,7 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
{
TCHAR *szMessage = NULL;
- GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_CONTROL };
- GCEVENT gce = { sizeof(gce), &gcd };
- gce.ptszUID = item->jid;
- gce.ptszText = xmlGetText(reason);
-
if (code != 307 && code != 301) {
- CallServiceSync(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
- CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, (LPARAM)&gce);
-
ptrT tszMessage(getTStringA("GcMsgQuit"));
if (tszMessage != NULL)
szMessage = NEWTSTR_ALLOCA(tszMessage);
@@ -351,9 +343,14 @@ void CJabberProto::GcQuit(JABBER_LIST_ITEM *item, int code, HXML reason)
else {
ptrT myNick(JabberNickFromJID(m_szJabberJID));
GcLogUpdateMemberStatus(item, myNick, myNick, NULL, GC_EVENT_KICK, reason);
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce);
}
+ GCDEST gcd = { m_szModuleName, item->jid, GC_EVENT_CONTROL };
+ GCEVENT gce = { sizeof(gce), &gcd };
+ gce.ptszUID = item->jid;
+ gce.ptszText = xmlGetText(reason);
+ CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce);
+
db_unset(HContactFromJID(item->jid), "CList", "Hidden");
item->bChatActive = FALSE;