From 492b9805b411980d12150321199654a4ad9f76a0 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Fri, 18 Jan 2019 12:14:12 +0500 Subject: SeenPlugin: add service for get last seen string version bump --- plugins/SeenPlugin/src/main.cpp | 15 +++++++++++++++ plugins/SeenPlugin/src/stdafx.h | 3 +++ plugins/SeenPlugin/src/version.h | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 1024825b1c..67da693e06 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -113,6 +113,9 @@ int CMPlugin::Load() g_plugin.addSound("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online")); g_plugin.addSound("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off")); g_plugin.addSound("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In")); + + CreateServiceFunction(MS_LASTSEEN_GET, GetParsedFormat); + return 0; } @@ -132,3 +135,15 @@ int CMPlugin::Unload() UninitHistoryDialog(); return 0; } + + +INT_PTR GetParsedFormat(WPARAM wParam, LPARAM) +{ + + MCONTACT hContact = (MCONTACT)wParam; + ptrW wszStamp(g_plugin.getWStringA("MenuStamp")); + + CMStringW wszRet(ParseString(wszStamp ? wszStamp : DEFAULT_MENUSTAMP, hContact)); + + return (INT_PTR)wszRet.Detach(); +} \ No newline at end of file diff --git a/plugins/SeenPlugin/src/stdafx.h b/plugins/SeenPlugin/src/stdafx.h index 39bb908b64..f76c1fc0ae 100644 --- a/plugins/SeenPlugin/src/stdafx.h +++ b/plugins/SeenPlugin/src/stdafx.h @@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include #include "resource.h" #include "version.h" @@ -119,6 +120,8 @@ void ShowHistory(MCONTACT hContact, BYTE isAlert); void InitFileOutput(void); void UninitFileOutput(void); +INT_PTR GetParsedFormat(WPARAM wParam, LPARAM lParam); + struct logthread_info { MCONTACT hContact; diff --git a/plugins/SeenPlugin/src/version.h b/plugins/SeenPlugin/src/version.h index 2658d14b39..7f5b5c5074 100644 --- a/plugins/SeenPlugin/src/version.h +++ b/plugins/SeenPlugin/src/version.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __MAJOR_VERSION 5 #define __MINOR_VERSION 0 #define __RELEASE_NUM 5 -#define __BUILD_NUM 3 +#define __BUILD_NUM 4 #include -- cgit v1.2.3