summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2019-01-18 13:10:11 +0500
committerElzorFox <elzorfox@ya.ru>2019-01-18 13:10:11 +0500
commit4ffc9c6cfb60f8e4f83dc27224cbbcf121800b82 (patch)
treeb3e3f6510780aed1170021e35681f0f059ced9b5 /plugins/Clist_modern
parent492b9805b411980d12150321199654a4ad9f76a0 (diff)
Clist_modern:
add 'Last Seen' support to status text version bump
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp12
-rw-r--r--plugins/Clist_modern/src/stdafx.h1
-rw-r--r--plugins/Clist_modern/src/version.h2
3 files changed, 14 insertions, 1 deletions
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index 46b4e95d48..0259ab7c8a 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -354,12 +354,24 @@ int GetStatusMessage(wchar_t *text, int text_size, ClcCacheEntry *pdnce, BOOL xs
// Get StatusMsg
if (pdnce->hContact && text[0] == '\0') {
+ if (noAwayMsg && ServiceExists(MS_LASTSEEN_GET)) {
+ ptrW pwszLastSeen((LPWSTR)CallService(MS_LASTSEEN_GET, (WPARAM)pdnce->hContact));
+ if (pwszLastSeen) {
+ CMStringW wszLastSeen(Translate("Last seen: "));
+ wszLastSeen.AppendFormat(L"%s", pwszLastSeen);
+ CopySkipUnprintableChars(text, (wchar_t*)wszLastSeen.c_str(), text_size - 1);
+ if (text[0] != '\0')
+ return 1;
+ }
+ }
+
ptrW tszStatusMsg(g_plugin.getWStringA(pdnce->hContact, "StatusMsg"));
if (tszStatusMsg != nullptr) {
CopySkipUnprintableChars(text, tszStatusMsg, text_size - 1);
if (text[0] != '\0')
return 1;
}
+
}
// Get XStatusMsg
diff --git a/plugins/Clist_modern/src/stdafx.h b/plugins/Clist_modern/src/stdafx.h
index bc4ab56896..1fe3af4871 100644
--- a/plugins/Clist_modern/src/stdafx.h
+++ b/plugins/Clist_modern/src/stdafx.h
@@ -101,6 +101,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_variables.h>
#include <m_smileyadd.h>
#include <m_folders.h>
+#include <m_seenplugin.h>
struct CMPlugin : public PLUGIN<CMPlugin>
{
diff --git a/plugins/Clist_modern/src/version.h b/plugins/Clist_modern/src/version.h
index 4d7628f1f1..eb8012bac7 100644
--- a/plugins/Clist_modern/src/version.h
+++ b/plugins/Clist_modern/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 9
#define __RELEASE_NUM 1
-#define __BUILD_NUM 7
+#define __BUILD_NUM 8
#include <stdver.h>