summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2019-01-18 12:14:12 +0500
committerElzorFox <elzorfox@ya.ru>2019-01-18 12:14:12 +0500
commit492b9805b411980d12150321199654a4ad9f76a0 (patch)
tree2bb3509adb514b2477b3b4d889311e5ab677a750 /plugins/SeenPlugin/src
parentc4a58bcf46c12aef3149aa97c26c7f1dd212afac (diff)
SeenPlugin:
add service for get last seen string version bump
Diffstat (limited to 'plugins/SeenPlugin/src')
-rw-r--r--plugins/SeenPlugin/src/main.cpp15
-rw-r--r--plugins/SeenPlugin/src/stdafx.h3
-rw-r--r--plugins/SeenPlugin/src/version.h2
3 files changed, 19 insertions, 1 deletions
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 <m_string.h>
#include <m_tipper.h>
+#include <m_seenplugin.h>
#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 <stdver.h>