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/BossKeyPlus/src | |
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/BossKeyPlus/src')
-rw-r--r-- | plugins/BossKeyPlus/src/BossKey.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index ed662b5057..622a20cda9 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -261,25 +261,12 @@ static int ChangeAllProtoStatuses(unsigned statusMode, TCHAR *msg) (g_wMask & OPT_ONLINEONLY) ? // check "Change only if current status is Online" option
((status == ID_STATUS_ONLINE) || (status == ID_STATUS_FREECHAT)) // process only "online" and "free for chat"
:
- ((status > ID_STATUS_OFFLINE) && (status < ID_STATUS_IDLE) && (status != ID_STATUS_INVISIBLE)) // process all existing statuses except for "invisible" & "offline"
- )
+ ((status > ID_STATUS_OFFLINE) && (status < ID_STATUS_IDLE) && (status != ID_STATUS_INVISIBLE))) // process all existing statuses except for "invisible" & "offline"
{
if (g_wMask & OPT_SETONLINEBACK){ // need to save old statuses & status messages
oldStatus[i] = status;
-
- char svc[256];
- mir_snprintf(svc, 256, "%s%s", proto[i]->szModuleName, PS_GETMYAWAYMSG);
- if (ServiceExists (svc))
- {
- if (ServiceExists (MS_AWAYMSG_GETSTATUSMSGT)) // if core can support unicode status message
- oldStatusMsg[i] = (TCHAR *)CallService (svc, 0, SGMA_TCHAR);
- else
- {
- char *tmp = (char *)CallService (svc, 0, 0);
- oldStatusMsg[i] = mir_a2t(tmp);
- mir_free(tmp);
- }
- }
+ if (ProtoServiceExists(proto[i]->szModuleName, PS_GETMYAWAYMSG))
+ oldStatusMsg[i] = (TCHAR*)CallProtoService(proto[i]->szModuleName, PS_GETMYAWAYMSG, 0, SGMA_TCHAR);
else
oldStatusMsg[i] = GetDefStatusMsg(status, proto[i]->szModuleName);
}
|