summaryrefslogtreecommitdiff
path: root/src/modules/protocols/protocols.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/protocols/protocols.cpp')
-rw-r--r--src/modules/protocols/protocols.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index 090428cc45..6121609829 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -38,7 +38,8 @@ typedef struct
TServiceListItem;
static int CompareServiceItems(const TServiceListItem* p1, const TServiceListItem* p2)
-{ return strcmp(p1->name, p2->name);
+{
+ return strcmp(p1->name, p2->name);
}
static LIST<TServiceListItem> serviceItems(10, CompareServiceItems);
@@ -46,7 +47,8 @@ static LIST<TServiceListItem> serviceItems(10, CompareServiceItems);
//------------------------------------------------------------------------------------
static int CompareProtos(const PROTOCOLDESCRIPTOR* p1, const PROTOCOLDESCRIPTOR* p2)
-{ return strcmp(p1->szName, p2->szName);
+{
+ return strcmp(p1->szName, p2->szName);
}
static LIST<PROTOCOLDESCRIPTOR> protos(10, CompareProtos);
@@ -267,11 +269,11 @@ void Proto_SetStatus(const char* szProto, unsigned status)
{
CallProtoServiceInt(NULL,szProto, PS_SETAWAYMSGT, status, (LPARAM) awayMsg);
mir_free(awayMsg);
- } }
+ }
+ }
CallProtoServiceInt(NULL,szProto, PS_SETSTATUS, status, 0);
}
-
char** __fastcall Proto_FilesMatrixA(wchar_t **files)
{
if (files == NULL) return NULL;
@@ -364,7 +366,7 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s
TServiceListItem *item = serviceItems.find((TServiceListItem*)&szService);
if (item) {
switch(item->id) {
- case 1:
+ case 1:
if (ppi->m_iVersion > 1 || !(((PROTOSEARCHRESULT*)lParam)->flags & PSR_UNICODE))
return (INT_PTR)ppi->AddToList(wParam, (PROTOSEARCHRESULT*)lParam);
else {
@@ -387,27 +389,27 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s
return res;
}
- case 2: return (INT_PTR)ppi->AddToListByEvent(LOWORD(wParam), HIWORD(wParam), (HANDLE)lParam);
- case 3: return (INT_PTR)ppi->Authorize((HANDLE)wParam);
- case 4:
+ case 2: return (INT_PTR)ppi->AddToListByEvent(LOWORD(wParam), HIWORD(wParam), (HANDLE)lParam);
+ case 3: return (INT_PTR)ppi->Authorize((HANDLE)wParam);
+ case 4:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->AuthDeny((HANDLE)wParam, (PROTOCHAR*)lParam);
- case 5: return (INT_PTR)ppi->AuthRecv(hContact, (PROTORECVEVENT*)lParam);
- case 6:
+ case 5: return (INT_PTR)ppi->AuthRecv(hContact, (PROTORECVEVENT*)lParam);
+ case 6:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthRequest(hContact, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->AuthRequest(hContact, (PROTOCHAR*)lParam);
- case 7: return (INT_PTR)ppi->ChangeInfo(wParam, (void*)lParam);
- case 8:
+ case 7: return (INT_PTR)ppi->ChangeInfo(wParam, (void*)lParam);
+ case 8:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->FileAllow(hContact, (HANDLE)wParam, (PROTOCHAR*)lParam);
- case 9: return (INT_PTR)ppi->FileCancel(hContact, (HANDLE)wParam);
- case 10:
+ case 9: return (INT_PTR)ppi->FileCancel(hContact, (HANDLE)wParam);
+ case 10:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->FileDeny(hContact, (HANDLE)wParam, StrConvT((char*)lParam));
else
@@ -510,7 +512,8 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s
INT_PTR res = (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action,
(const PROTOCHAR**)&szFname);
mir_free(szFname);
- } }
+ }
+ }
case 106:
if (ppi->m_iVersion > 1)
return (INT_PTR)ppi->AuthRequest(hContact, (const TCHAR*)lParam);
@@ -539,8 +542,9 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s
return (INT_PTR)ppi->SearchByEmail((const TCHAR*)lParam);
else
return (INT_PTR)ppi->SearchByEmail(StrConvA((const TCHAR*)lParam));
- } } }
-
+ }
+ }
+ }
if ( !strcmp(szService, PS_ADDTOLIST)) {
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
@@ -602,8 +606,8 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s
}
case 110:
return (INT_PTR)pa->ppro->SearchByEmail((const TCHAR*)lParam);
- } }
-
+ }
+ }
return res;
}