summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-xplugins/New_GPG/src/messages.cpp10
-rwxr-xr-xplugins/New_GPG/src/metacontacts.cpp2
-rwxr-xr-xplugins/New_GPG/src/options.cpp2
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp6
4 files changed, 9 insertions, 11 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index abc1a624ec..db17333da6 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -568,11 +568,9 @@ int RecvMsgSvc(WPARAM w, LPARAM l)
}
else if(!isContactHaveKey(ccs->hContact) && bAutoExchange && gpg_valid && gpg_keyexist)
{
- LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ char *proto = GetContactProto(ccs->hContact);
DWORD uin = DBGetContactSettingDword(ccs->hContact, proto, "UIN", 0);
- if(uin)
- {
- char *proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ if(uin) {
char svc[64];
strcpy(svc, proto);
strcat(svc, PS_ICQ_CHECKCAPABILITY);
@@ -841,11 +839,11 @@ int SendMsgSvc(WPARAM w, LPARAM l)
if(bAutoExchange && !strstr(msg, "-----PGP KEY REQUEST-----") && !strstr(msg, "-----BEGIN PGP PUBLIC KEY BLOCK-----") && gpg_valid)
{
void send_encrypted_msgs_thread(HANDLE hContact);
- LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ LPSTR proto = GetContactProto(ccs->hContact);
DWORD uin = DBGetContactSettingDword(ccs->hContact, proto, "UIN", 0);
if(uin)
{
- char *proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
+ char *proto = GetContactProto(ccs->hContact);
char svc[64];
strcpy(svc, proto);
strcat(svc, PS_ICQ_CHECKCAPABILITY);
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp
index 1abc2aaeac..ab3c60bce5 100755
--- a/plugins/New_GPG/src/metacontacts.cpp
+++ b/plugins/New_GPG/src/metacontacts.cpp
@@ -21,7 +21,7 @@ extern bool bMetaContacts;
bool metaIsProtoMetaContacts(HANDLE hContact)
{
if(bMetaContacts) {
- LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ LPSTR proto = GetContactProto(hContact);
if( proto && strcmp(proto,"MetaContacts")==0 ) {
return true;
}
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index add9e9566c..8b9f32d58c 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -156,7 +156,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
item.pszText = name;
iRow = ListView_InsertItem(hwndList, &item);
ListView_SetItemText(hwndList, iRow, 0, name);
- TCHAR *tmp = mir_a2t((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0));
+ TCHAR *tmp = mir_a2t(GetContactProto(hContact));
ListView_SetItemText(hwndList, iRow, 4, tmp);
mir_free(tmp);
tmp2 = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", "");
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index f0a8e7a387..f872bd5e7f 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -146,7 +146,7 @@ INT_PTR SendKey(WPARAM w, LPARAM l)
hContact = metaGetMostOnline(hContact);
char *szMessage;
{
- LPSTR proto = (LPSTR)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ LPSTR proto = GetContactProto(hContact);
PROTOACCOUNT *acc = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)proto);
std::string acc_str;
if(acc)
@@ -1165,7 +1165,7 @@ int SendBroadcast( HANDLE hContact, int type, int result, HANDLE hProcess, LPARA
ACKDATA ack;
memset(&ack,0,sizeof(ack));
ack.cbSize = sizeof( ACKDATA );
- ack.szModule = szGPGModuleName;// (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ ack.szModule = szGPGModuleName;// GetContactProto(hContact);
ack.hContact = hContact;
ack.type = type;
ack.result = result;
@@ -1334,7 +1334,7 @@ INT_PTR ExportGpGKeys(WPARAM w, LPARAM l)
std::string key = k;
mir_free(k);
- const char* proto = (const char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ const char* proto = (const char*)GetContactProto(hContact);
std::string id = "Comment: login ";
const char * uid = (const char*)CallProtoService(proto, PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0);
DBVARIANT dbv = {0};