diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:41:05 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:41:05 +0000 |
commit | f4c65c1deac3879965e6ead329342afd538bd517 (patch) | |
tree | 7a6ef958f6738b238b69b17eca88be4e8f09a34b /plugins/MenuItemEx/src | |
parent | 53998ab8b091c2830bc8b4d801099795dcf80c1b (diff) |
Menuitemex: fixed setting login/logoff timestamp
git-svn-id: http://svn.miranda-ng.org/main/trunk@1554 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx/src')
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index c961dfe624..547cfbf290 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -1183,10 +1183,11 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam ) if (oldStatus == ID_STATUS_OFFLINE)
{
// set online timestamp for this contact, only when not set already
- DBWriteContactSettingDword(hContact, lpzProto, "LogonTS", ( DWORD )time(NULL));
+ if (!DBGetContactSettingDword(hContact, lpzProto, "LogonTS", FALSE))
+ DBWriteContactSettingDword(hContact, lpzProto, "LogonTS", ( DWORD )time(NULL));
- // TODO: dont reset logoff timestamp?
- DBDeleteContactSetting(hContact, lpzProto, "LogoffTS");
+ // TODO: don't reset logoff timestamp?
+ // DBDeleteContactSetting(hContact, lpzProto, "LogoffTS");
// TESTING: updating user's details
if (DBGetContactSettingDword(NULL, VISPLG, "flags", vf_default) & VF_REFRESH)
|