diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-23 21:03:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-23 21:03:17 +0300 |
commit | 71fcd78ec9a08c7d613f57620fff155d7681d4ef (patch) | |
tree | 9b05cf3f5aa36e1140d2de7d516a6c4bef3af029 /plugins/WhenWasIt/src/hooked_events.cpp | |
parent | bddc397fa9e6c164d0288b4665fa10806f8363fa (diff) |
WWI: Age to be saved into correct module
Diffstat (limited to 'plugins/WhenWasIt/src/hooked_events.cpp')
-rw-r--r-- | plugins/WhenWasIt/src/hooked_events.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 6c83cd2408..e356854b44 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -107,11 +107,12 @@ int RefreshContactListIcons(MCONTACT hContact) int dab = NotifyMissedContactBirthday(hContact, today, g_plugin.daysAfter);
if (ok && (dtb >= 0 || dab > 0)) {
- int age = GetContactAge(hContact);
- db_set_b(hContact, "UserInfo", "Age", age);
+ int year, month, day;
+ int mode = GetContactDOB(hContact, year, month, day);
+ int age = GetContactAge(year, month, day);
+ db_set_b(hContact, GetModule(hContact, mode), "Age", age);
- if ((bShouldCheckBirthdays) && (g_plugin.bUsePopups))
- {
+ if (bShouldCheckBirthdays && g_plugin.bUsePopups) {
if (dtb >= 0) {
bBirthdayFound = 1; //only set it if we're called from our CheckBirthdays service
PopupNotifyBirthday(hContact, dtb, age);
@@ -124,7 +125,7 @@ int RefreshContactListIcons(MCONTACT hContact) if (dtb >= 0)
SoundNotifyBirthday(dtb);
- if ((bShouldCheckBirthdays) && (g_plugin.bUseDialog)) {
+ if (bShouldCheckBirthdays && g_plugin.bUseDialog) {
if (dtb >= 0)
DialogNotifyBirthday(hContact, dtb, age);
else if (dab > 0)
|