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/CSList | |
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/CSList')
-rw-r--r-- | plugins/CSList/src/cslist.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 34b32f470c..0ce1c3f5cd 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -100,12 +100,9 @@ static int OnCreateMenuItems(WPARAM, LPARAM) PROTOACCOUNT** pdesc;
ProtoEnumAccounts(&protoCount, &pdesc);
- for (int i = 0; i < protoCount; i++) {
- char szService[100];
- mir_snprintf(szService, SIZEOF(szService), "%s%s", pdesc[i]->szModuleName, PS_SETCUSTOMSTATUSEX);
- if ( ServiceExists(szService))
+ for (int i = 0; i < protoCount; i++)
+ if ( ProtoServiceExists(pdesc[i]->szModuleName, PS_SETCUSTOMSTATUSEX))
addProtoStatusMenuItem(pdesc[i]->szModuleName);
- }
return 0;
}
@@ -189,9 +186,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) if (pdescr == NULL)
return;
- char szService[100];
- mir_snprintf(szService, SIZEOF(szService), "%s%s", szAccName, PS_SETCUSTOMSTATUSEX);
- if ( !ServiceExists(szService))
+ if ( !ProtoServiceExists(szAccName, PS_SETCUSTOMSTATUSEX))
return;
int statusToSet;
@@ -212,7 +207,7 @@ void SetStatus(WORD code, StatusItem* item, char *szAccName) else return;
ics.status = &statusToSet;
- CallService(szService, 0, (LPARAM)&ics);
+ CallProtoService(szAccName, PS_SETCUSTOMSTATUSEX, 0, (LPARAM)&ics);
}
INT_PTR showList(WPARAM wparam, LPARAM lparam, LPARAM param)
|