From b5ce6f26e8b5389f2be2360509d336b539b65f56 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 14 Sep 2020 12:42:58 +0300 Subject: g_chatApi.LogToFile completely moved into the core --- plugins/TabSRMM/src/chat.h | 3 +-- plugins/TabSRMM/src/chat_main.cpp | 1 - plugins/TabSRMM/src/chat_tools.cpp | 20 -------------------- 3 files changed, 1 insertion(+), 23 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h index 17e7dab2f1..eef0e184aa 100644 --- a/plugins/TabSRMM/src/chat.h +++ b/plugins/TabSRMM/src/chat.h @@ -52,7 +52,7 @@ struct MODULEINFO : public GCModuleInfoBase struct SESSION_INFO : public GCSessionInfoBase { - int iLogTrayFlags, iLogPopupFlags, iDiskLogFlags; + int iLogTrayFlags, iLogPopupFlags; }; struct LOGSTREAMDATA : public GCLogStreamDataBase @@ -130,7 +130,6 @@ void Chat_SetFilters(SESSION_INFO *si); void DoFlashAndSoundWorker(FLASH_PARAMS* p); BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce); int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, wchar_t* pszRoomName, COLORREF crBkg, const wchar_t* fmt, ...); -BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce); #include "chat_resource.h" diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index ce201a4f91..55777bec1c 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -372,7 +372,6 @@ int Chat_Load() // this operation is unsafe, that's why we restore the old pci state on exit g_chatApi.DoSoundsFlashPopupTrayStuff = DoSoundsFlashPopupTrayStuff; g_chatApi.IsHighlighted = IsHighlighted; - oldLogToFile = g_chatApi.LogToFile; g_chatApi.LogToFile = LogToFile; oldDoPopup = g_chatApi.DoPopup; g_chatApi.DoPopup = DoPopup; oldDoTrayIcon = g_chatApi.DoTrayIcon; g_chatApi.ShowPopup = ShowPopup; g_chatApi.Log_CreateRTF = Log_CreateRTF; diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index cc43998dd8..ad2b476e04 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -471,24 +471,6 @@ wchar_t* my_strstri(const wchar_t* s1, const wchar_t* s2) return nullptr; } -/* -* log the event to the log file -* allows selective logging of wanted events -*/ -BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) -{ - if (!si || !gce) - return FALSE; - - /* - * check whether we have to log this event - */ - if (!(gce->iType & si->iDiskLogFlags)) - return FALSE; - - return oldLogToFile(si, gce); // call kernel method -} - /* * set all filters and notification config for a session * uses per channel mask + filterbits, default config as backup @@ -524,8 +506,6 @@ void Chat_SetFilters(SESSION_INFO *si) dwFlags_local = db_get_dw(si->hContact, CHAT_MODULE, "TrayIconFlags", GC_EVENT_HIGHLIGHT); dwMask = db_get_dw(si->hContact, CHAT_MODULE, "TrayIconMask", 0); - si->iDiskLogFlags = db_get_dw(0, CHAT_MODULE, "DiskLogFlags", GC_EVENT_ALL); - si->iLogTrayFlags = dwFlags_default; for (int i = 0; i < 32; i++) { DWORD dwBit = 1 << i; -- cgit v1.2.3