summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Alarms/src/alarms.cpp6
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/MetaContacts/src/meta_services.cpp10
-rw-r--r--plugins/MirOTR/MirOTR/src/utils.cpp18
4 files changed, 6 insertions, 30 deletions
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index cc3164809c..aea3791a9c 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -123,12 +123,6 @@ static int PluginMessageReceived(WPARAM wParam,LPARAM lParam)
}
else mir_sntprintf(buff, SIZEOF(buff), _T("Unknown command issued: \"%s\""), msg);
- /*
- ppre->szMessage = (char *)Translate(buff);
- retval = CallService( MS_PROTO_CHAINRECV, wParam, lParam );
- ppre->szMessage = savedMsg;
- */
-
ShowPopup(pccsd->hContact, buff);
_tcscpy(response, buff);
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 14a905a9b8..197e59309f 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -143,7 +143,7 @@ INT_PTR OnRecvMessage( WPARAM wParam, LPARAM lParam )
PROTORECVEVENT *ppre = ( PROTORECVEVENT * )pccsd->lParam;
if(strncmp(ppre->szMessage, szServicePrefix, strlen(szServicePrefix)))
- return CallService( MS_PROTO_CHAINRECV, wParam, lParam );
+ return CallService(MS_PROTO_CHAINRECV, wParam, lParam);
HWND hwnd = WindowList_Find(hFileList, (HANDLE)pccsd->hContact);
if(!IsWindow(hwnd))
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index d48d187d85..c837a7b1c8 100644
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -485,7 +485,6 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
*/
INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
{
- DBEVENTINFO dbei;
CCSDATA *ccs = (CCSDATA *) lParam;
PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
@@ -499,17 +498,14 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
// use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!)
HANDLE most_online = Meta_GetMostOnline(ccs->hContact);
char *proto = GetContactProto(most_online);
- if (proto) {
- char service[256];
- mir_snprintf(service, 256, "%s%s", proto, PSR_MESSAGE);
- if (CallService(service, wParam, lParam) != CALLSERVICE_NOTFOUND)
+ if (proto)
+ if ( CallProtoService(proto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND)
return 0;
- }
}
// otherwise, add event to db directly
- ZeroMemory(&dbei, sizeof(dbei));
+ DBEVENTINFO dbei = { 0 };
dbei.cbSize = sizeof(dbei);
dbei.szModule = META_PROTO;
dbei.timestamp = pre->timestamp;
diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp
index ea9b55b619..f15987716b 100644
--- a/plugins/MirOTR/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/MirOTR/src/utils.cpp
@@ -320,14 +320,8 @@ void ShowMessageInline(const HANDLE hContact, const TCHAR *msg) {
char *utf = mir_utf8encodeT(buff);
pre.szMessage = utf;
pre.flags = PREF_UTF|PREF_BYPASS_OTR;
- //CallContactService(hContact, PSR_MESSAGE, 0, (LPARAM)&pre);
+ ProtoChainRecvMsg(hContact, &pre);
- CCSDATA ccs = {0};
- ccs.hContact = hContact;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.lParam = (LPARAM)⪯
-
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
mir_free(utf);
}
@@ -339,17 +333,9 @@ void ShowMessageInlineUtf(const HANDLE hContact, const char *msg) {
pre.timestamp = time(0);
pre.szMessage = buff;
pre.flags = PREF_UTF|PREF_BYPASS_OTR;
- //CallContactService(hContact, PSR_MESSAGE, 0, (LPARAM)&pre);
-
- CCSDATA ccs = {0};
- ccs.hContact = hContact;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.lParam = (LPARAM)⪯
-
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
+ ProtoChainRecvMsg(hContact, &pre);
}
-
void ShowMessageUtf(const HANDLE hContact, const char *msg) {
if(options.msg_inline)
ShowMessageInlineUtf(hContact, msg);