diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-07 12:34:11 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-07 12:34:15 +0300 |
commit | 4e37f3cad6064396a701fe96bf4801d37d40b362 (patch) | |
tree | 120628241d4f69ad1db55b2d5b883d53670784e8 /plugins/MenuItemEx | |
parent | ceeb2257878b17ebda20f8f3eea72ae2de598fb4 (diff) |
fingerprint: more strict service definitions
Diffstat (limited to 'plugins/MenuItemEx')
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 2e0e54e8da..1ba2c38e31 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -269,14 +269,12 @@ BOOL MirVerExists(MCONTACT hContact) LPWSTR getMirVer(MCONTACT hContact)
{
LPSTR szProto = Proto_GetBaseAccountName(hContact);
- if (!szProto) return nullptr;
+ if (!szProto)
+ return nullptr;
- LPWSTR msg = db_get_wsa(hContact, szProto, "MirVer");
- if (msg) {
- if (msg[0] != 0)
- return msg;
- mir_free(msg);
- }
+ ptrW msg(db_get_wsa(hContact, szProto, "MirVer"));
+ if (msg && msg[0] != 0)
+ return msg.detach();
return nullptr;
}
@@ -422,7 +420,7 @@ static void ModifyCopyIP(MCONTACT hContact) static void ModifyCopyMirVer(MCONTACT hContact)
{
HICON hMenuIcon = nullptr;
- if (ServiceExists(MS_FP_GETCLIENTICONT)) {
+ if (Finger_IsPresent()) {
LPWSTR msg = getMirVer(hContact);
if (msg) {
hMenuIcon = Finger_GetClientIcon(msg, 1);
|