From 10b1d999efb61ac368233d215d4c43e72e0d08d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 23 Apr 2014 14:43:54 +0000 Subject: Make GCW_PRIVMESS to work pretty much same as GCW_CHATROOM git-svn-id: http://svn.miranda-ng.org/main/trunk@9057 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/log.cpp | 2 +- src/modules/chat/manager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp index c0d96658c9..10af6038f4 100644 --- a/src/modules/chat/log.cpp +++ b/src/modules/chat/log.cpp @@ -342,7 +342,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) // ### RTF BODY (one iteration per event that should be streamed in) while (lin) { // filter - if (streamData->si->iType != GCW_CHATROOM || !streamData->si->bFilterEnabled || (streamData->si->iLogFilterFlags&lin->iType) != 0) { + if ((streamData->si->iType != GCW_CHATROOM && streamData->si->iType != GCW_PRIVMESS) || !streamData->si->bFilterEnabled || (streamData->si->iLogFilterFlags&lin->iType) != 0) { // create new line, and set font and color Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\par%s ", Log_SetStyle(0)); diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp index 41cc818af3..9028d3e02b 100644 --- a/src/modules/chat/manager.cpp +++ b/src/modules/chat/manager.cpp @@ -88,7 +88,7 @@ static void SM_FreeSession(SESSION_INFO *si) // contact may have been deleted here already, since function may be called after deleting // contact so the handle may be invalid, therefore db_get_b shall return 0 if (si->hContact && db_get_b(si->hContact, si->pszModule, "ChatRoom", 0) != 0) { - ci.SetOffline(si->hContact, si->iType == GCW_CHATROOM ? TRUE : FALSE); + ci.SetOffline(si->hContact, (si->iType == GCW_CHATROOM || si->iType == GCW_PRIVMESS) ? TRUE : FALSE); db_set_s(si->hContact, si->pszModule, "Topic", ""); db_set_s(si->hContact, si->pszModule, "StatusBar", ""); db_unset(si->hContact, "CList", "StatusMsg"); @@ -552,7 +552,7 @@ static BOOL SM_SendUserMessage(const TCHAR *pszID, const char *pszModule, const SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { - if (pTemp->iType == GCW_CHATROOM) + if (pTemp->iType == GCW_CHATROOM || pTemp->iType == GCW_PRIVMESS) DoEventHook(pTemp->ptszID, pTemp->pszModule, GC_USER_MESSAGE, NULL, pszText, 0); if (pszID) return TRUE; -- cgit v1.2.3