diff options
-rw-r--r-- | plugins/NewXstatusNotify/docs/nxsn_readme.txt | 4 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 14 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/options.cpp | 1 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/options.h | 1 |
4 files changed, 20 insertions, 0 deletions
diff --git a/plugins/NewXstatusNotify/docs/nxsn_readme.txt b/plugins/NewXstatusNotify/docs/nxsn_readme.txt index 95e868b92d..eca88d4188 100644 --- a/plugins/NewXstatusNotify/docs/nxsn_readme.txt +++ b/plugins/NewXstatusNotify/docs/nxsn_readme.txt @@ -8,6 +8,10 @@ This plugin is modified NewStatusNotify plugin by Vasilich with added extra stat notification and many other features. Plugin shows a popup and logs to a message window
when someone in your contact list changes status, ICQ XStatus or Jabber mood/activity.
+Hidden option: add "EnableLastSeen" byte value to "NewStatusNotify" module and set it
+to 1 to store information about the recent appearance of contacts. The information will
+be stored in the "SeenModule" in contact and can be displayed using the Tipper plugin.
+
changelog
**********
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 91689bf1c8..3c01e6802a 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -762,6 +762,20 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) strcpy(szProto, hlpProto);
WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
+ if (opt.EnableLastSeen && newStatus == ID_STATUS_OFFLINE && oldStatus > ID_STATUS_OFFLINE) {
+ // A simple implementation of Last Seen module, please don't touch this.
+ SYSTEMTIME systime;
+ GetLocalTime(&systime);
+
+ db_set_w(hContact, "SeenModule", "Year", systime.wYear);
+ db_set_w(hContact, "SeenModule", "Month", systime.wMonth);
+ db_set_w(hContact, "SeenModule", "Day", systime.wDay);
+ db_set_w(hContact, "SeenModule", "Hours", systime.wHour);
+ db_set_w(hContact, "SeenModule", "Minutes", systime.wMinute);
+ db_set_w(hContact, "SeenModule", "Seconds", systime.wSecond);
+ db_set_w(hContact, "SeenModule", "Status", oldStatus);
+ }
+
if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta
HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
hlpProto = GetContactProto(hSubContact);
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index d601613fa8..be7ad11dbd 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -87,6 +87,7 @@ void LoadOptions() opt.PopupOnConnect = db_get_b(0, MODULE, "PopupOnConnect", 0);
// OTHER
opt.TempDisabled = db_get_b(0, MODULE, "TempDisable", 0);
+ opt.EnableLastSeen = db_get_b(0, MODULE, "EnableLastSeen", 0);
LoadTemplates();
diff --git a/plugins/NewXstatusNotify/src/options.h b/plugins/NewXstatusNotify/src/options.h index b5e2eff5c9..dc62e034e7 100644 --- a/plugins/NewXstatusNotify/src/options.h +++ b/plugins/NewXstatusNotify/src/options.h @@ -67,6 +67,7 @@ typedef struct tagOPTIONS { BYTE TempDisabled;
BYTE PopupAutoDisabled;
BYTE SoundAutoDisabled;
+ BYTE EnableLastSeen;
} OPTIONS;
typedef struct tagTEMPLATES {
|