diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-18 14:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-18 14:12:13 +0000 |
commit | 81337e86426dd4a79836554342bdc2e7e6195769 (patch) | |
tree | 4854edef6130b994f3611eb1a035b5de8b37f5cc /plugins/Clist_nicer/src/clui.cpp | |
parent | 4f14e4f86d5855d75c0941f9b8495e5a2e522087 (diff) |
massive extinction of stupid service name's buffers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clui.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index fe000c8e9d..2b346b8ccc 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1384,11 +1384,9 @@ skipbg: }
else if (item->dwFlags & BUTTON_ISPROTOSERVICE && cfg::clcdat) {
if (contactOK) {
- char szFinalService[512];
-
- mir_snprintf(szFinalService, 512, "%s/%s", GetContactProto(hContact), item->szService);
- if (ServiceExists(szFinalService))
- CallService(szFinalService, wwParam, llParam);
+ char *szProto = GetContactProto(hContact);
+ if (ProtoServiceExists(szProto, item->szService))
+ CallProtoService(szProto, item->szService, wwParam, llParam);
else
serviceFailure = TRUE;
}
@@ -1708,15 +1706,11 @@ buttons_done: hIcon = Skin_GetIcon(szBuffer);
}
else if (cfg::dat.bShowXStatusOnSbar && status > ID_STATUS_OFFLINE) {
- CUSTOM_STATUS cst = {0};
- char szServiceName[128];
int xStatus;
-
- mir_snprintf(szServiceName, 128, "%s%s", pd->RealName, PS_GETCUSTOMSTATUSEX);
- cst.cbSize = sizeof(CUSTOM_STATUS);
+ CUSTOM_STATUS cst = { sizeof(cst) };
cst.flags = CSSF_MASK_STATUS;
cst.status = &xStatus;
- if (ServiceExists(szServiceName) && !CallService(szServiceName, 0, (LPARAM)&cst) && xStatus > 0)
+ if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0)
hIcon = (HICON)CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSICON, 0, LR_SHARED); // get OWN xStatus icon (if set)
else
hIcon = LoadSkinnedProtoIcon(szProto, status);
|