diff options
author | Vlad Mironov <mironych@googlemail.com> | 2014-03-31 05:04:49 +0000 |
---|---|---|
committer | Vlad Mironov <mironych@googlemail.com> | 2014-03-31 05:04:49 +0000 |
commit | 9e195db36b720ba2d796a883769b5ac34e1ad59b (patch) | |
tree | 0196f141e93aea17628a7b3652d73f8cf93f4913 /plugins/Variables | |
parent | a918638dd89a73a51023e5bafe7d5a0ee09bf9d2 (diff) |
Variables: added ability to get a own nickname for protocol.
git-svn-id: http://svn.miranda-ng.org/main/trunk@8805 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables')
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 14 | ||||
-rw-r--r-- | plugins/Variables/src/parse_miranda.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 30e48f5db5..5b9fffc976 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -436,6 +436,20 @@ static TCHAR* parseProtoInfo(ARGUMENTSINFO *ai) if (szText != NULL)
szRes = _strdup(szText);
}
+ else if (!_tcscmp(ai->targv[2], _T(STR_PINICK)))
+ {
+ CONTACTINFO ci;
+
+ ci.cbSize = sizeof(CONTACTINFO);
+ ci.dwFlag = CNF_DISPLAY | CNF_UNICODE;
+ ci.hContact = NULL;
+ ci.szProto = szProto;
+ CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci);
+
+ tszRes = mir_tstrdup(ci.pszVal);
+
+ mir_free(ci.pszVal);
+ }
mir_free(szProto);
if (szRes == NULL && tszRes == NULL)
return NULL;
diff --git a/plugins/Variables/src/parse_miranda.h b/plugins/Variables/src/parse_miranda.h index 5dbb9368c2..851b3963df 100644 --- a/plugins/Variables/src/parse_miranda.h +++ b/plugins/Variables/src/parse_miranda.h @@ -42,6 +42,7 @@ #define STR_PINAME "name"
#define STR_PIUIDTEXT "uidtext"
#define STR_PIUIDSETTING "uidsetting"
+#define STR_PINICK "nick"
#define SEEN_MODULE "SeenModule"
|