From 81337e86426dd4a79836554342bdc2e7e6195769 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Jun 2013 14:12:13 +0000 Subject: massive extinction of stupid service name's buffers git-svn-id: http://svn.miranda-ng.org/main/trunk@5010 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BossKeyPlus/src/BossKey.cpp | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'plugins/BossKeyPlus') 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); } -- cgit v1.2.3