diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-05-17 16:25:55 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-05-17 16:25:55 +0000 |
commit | 5e727508f4a06579061ac378efef03cd7b36381b (patch) | |
tree | 5c346ecf29f3a2998d1355024359a74cf4f52d1e /plugins/NewXstatusNotify/src/main.cpp | |
parent | 6dbf1f694ca04c4515f886502f14501aaeec2e7f (diff) |
NewXStatusNotify: status changes are always logged, even if popups are disabled.
git-svn-id: http://svn.miranda-ng.org/main/trunk@9206 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify/src/main.cpp')
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 971189eae3..b3d2fa8f18 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -743,6 +743,24 @@ void PlayChangeSound(MCONTACT hContact, WORD oldStatus, WORD newStatus) int ContactStatusChanged(MCONTACT hContact, WORD oldStatus,WORD newStatus)
{
+ if(opt.LogToDB && (!opt.CheckMessageWindow || CheckMsgWnd(hContact))) {
+ TCHAR stzStatusText[MAX_SECONDLINE] = {0};
+ GetStatusText(hContact,newStatus,oldStatus,stzStatusText);
+ char *blob = mir_utf8encodeT(stzStatusText);
+
+ DBEVENTINFO dbei = {0};
+ dbei.cbSize = sizeof(dbei);
+ dbei.cbBlob = (DWORD)strlen(blob) + 1;
+ dbei.pBlob = (PBYTE) blob;
+ dbei.eventType = EVENTTYPE_STATUSCHANGE;
+ dbei.flags = DBEF_READ | DBEF_UTF;
+
+ dbei.timestamp = (DWORD)time(NULL);
+ dbei.szModule = MODULE;
+ HANDLE hDBEvent = db_event_add(hContact, &dbei);
+ mir_free(blob);
+ }
+
bool bEnablePopup = true, bEnableSound = true;
char *szProto = GetContactProto(hContact);
@@ -824,24 +842,6 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus,WORD newStatus) if (bEnableSound && db_get_b(0, "Skin", "UseSound", TRUE) && db_get_b(hContact, MODULE, "EnableSounds", 1))
PlayChangeSound(hContact, oldStatus, newStatus);
- if(opt.LogToDB && (!opt.CheckMessageWindow || CheckMsgWnd(hContact))) {
- TCHAR stzStatusText[MAX_SECONDLINE] = {0};
- GetStatusText(hContact,newStatus,oldStatus,stzStatusText);
- char *blob = mir_utf8encodeT(stzStatusText);
-
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
- dbei.cbBlob = (DWORD)strlen(blob) + 1;
- dbei.pBlob = (PBYTE) blob;
- dbei.eventType = EVENTTYPE_STATUSCHANGE;
- dbei.flags = DBEF_READ | DBEF_UTF;
-
- dbei.timestamp = (DWORD)time(NULL);
- dbei.szModule = MODULE;
- HANDLE hDBEvent = db_event_add(hContact, &dbei);
- mir_free(blob);
- }
-
if (opt.Log) {
TCHAR stzDate[MAX_STATUSTEXT], stzTime[MAX_STATUSTEXT], stzText[1024];
|