From 9c2e0c8b025c98cbff2975e6dd9c86e03cd04244 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 10 Nov 2012 21:36:54 +0000 Subject: code cleaning for ME_DB_CONTACT_SETTINGCHANGED in plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@2283 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/MenuItemEx') diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index c96512f956..ce2d7349c4 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -1162,8 +1162,7 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam ) if (DBGetContactSettingByte(hContact, lpzProto, "ChatRoom", 0)) return 0; - if (oldStatus == ID_STATUS_OFFLINE) - { + if (oldStatus == ID_STATUS_OFFLINE) { // set logon timestamp for this contact, only when not set already if (!DBGetContactSettingDword(hContact, lpzProto, "LogonTS", FALSE)) DBWriteContactSettingDword(hContact, lpzProto, "LogonTS", ( DWORD )time(NULL)); @@ -1172,15 +1171,13 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam ) DBDeleteContactSetting(hContact, lpzProto, "LogoffTS"); // TESTING: updating user's details - if (DBGetContactSettingDword(NULL, VISPLG, "flags", vf_default) & VF_REFRESH) - { + if (DBGetContactSettingDword(NULL, VISPLG, "flags", vf_default) & VF_REFRESH) { // don't refresh Hidden or NotOnList contact's details if (!DBGetContactSettingByte(hContact, "CList", "Hidden", 0) && !DBGetContactSettingByte((HANDLE)wParam, "CList", "NotOnList", 0)) CallContactService(hContact, PSS_GETINFO, 0, 0 ); } } - if (newStatus == ID_STATUS_OFFLINE) - { + if (newStatus == ID_STATUS_OFFLINE) { // set logoff timestamp for this contact DBWriteContactSettingDword(hContact, lpzProto, "LogoffTS", ( DWORD )time(NULL)); // reset logon timestamp -- cgit v1.2.3