summaryrefslogtreecommitdiff
path: root/src/modules/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 13:50:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 13:50:53 +0000
commit5f8a607f900a42e27bf166b86185001aadf3e9f2 (patch)
tree6c69f5caebc55e84437ddc23013fada0a69af397 /src/modules/protocols
parent5e0f2fb896d874f9b7f5c069a90de64305089542 (diff)
more fun:
- MS_AWAYMSG_GETSTATUSMSGW/T is present in any MIID_SRAWAY plugin, so there's no need to check its existence; - therefore MS_AWAYMSG_GETSTATUSMSG considered useless, cause it has no references git-svn-id: http://svn.miranda-ng.org/main/trunk@8293 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols')
-rw-r--r--src/modules/protocols/protocols.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index c0b0410563..0191d62d7c 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -113,7 +113,7 @@ static INT_PTR Proto_RegisterModule(WPARAM, LPARAM lParam)
// let's create a new container
PROTO_INTERFACE* ppi = AddDefaultAccount(pd->szName);
if (ppi) {
- PROTOACCOUNT* pa = Proto_GetAccount(pd->szName);
+ PROTOACCOUNT *pa = Proto_GetAccount(pd->szName);
if (pa == NULL) {
pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(PROTOACCOUNT);
@@ -247,18 +247,9 @@ static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam)
void Proto_SetStatus(const char *szProto, unsigned status)
{
if (CallProtoServiceInt(NULL, szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
- TCHAR* awayMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGW, (WPARAM)status, (LPARAM)szProto);
- if ((INT_PTR)awayMsg == CALLSERVICE_NOTFOUND) {
- char* awayMsgA = (char*)CallService(MS_AWAYMSG_GETSTATUSMSG, (WPARAM)status, (LPARAM)szProto);
- if ((INT_PTR)awayMsgA != CALLSERVICE_NOTFOUND) {
- awayMsg = mir_a2t(awayMsgA);
- mir_free(awayMsgA);
- }
- }
- if ((INT_PTR)awayMsg != CALLSERVICE_NOTFOUND) {
- CallProtoServiceInt(NULL, szProto, PS_SETAWAYMSGT, status, (LPARAM)awayMsg);
- mir_free(awayMsg);
- }
+ TCHAR *awayMsg = (TCHAR*)CallService(MS_AWAYMSG_GETSTATUSMSGT, status, (LPARAM)szProto);
+ CallProtoServiceInt(NULL, szProto, PS_SETAWAYMSGT, status, (LPARAM)awayMsg);
+ mir_free(awayMsg);
}
CallProtoServiceInt(NULL, szProto, PS_SETSTATUS, status, 0);
}
@@ -339,7 +330,7 @@ static INT_PTR Proto_EnumAccounts(WPARAM wParam, LPARAM lParam)
return 0;
}
-bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT* pa)
+bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT *pa)
{
return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
}
@@ -349,7 +340,7 @@ static INT_PTR srvProto_IsAccountEnabled(WPARAM, LPARAM lParam)
return (INT_PTR)Proto_IsAccountEnabled((PROTOACCOUNT*)lParam);
}
-bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT* pa)
+bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT *pa)
{
return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
}
@@ -374,7 +365,7 @@ INT_PTR CallProtoService(const char* szModule, const char* szService, WPARAM wPa
INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
{
- PROTOACCOUNT* pa = Proto_GetAccount(szModule);
+ PROTOACCOUNT *pa = Proto_GetAccount(szModule);
if (pa && !pa->bOldProto) {
PROTO_INTERFACE* ppi;
if ((ppi = pa->ppro) == NULL)