summaryrefslogtreecommitdiff
path: root/otr/dllmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'otr/dllmain.cpp')
-rw-r--r--otr/dllmain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp
index 26a348e..24f41ea 100644
--- a/otr/dllmain.cpp
+++ b/otr/dllmain.cpp
@@ -1013,7 +1013,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
return 0;
}
- if(strcmp(proto, "MetaContacts") == 0) {
+ if(ServiceExists(MS_MC_GETPROTOCOLNAME) && strcmp(proto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0)) == 0) {
HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if(!hSubContact)
return 0;
@@ -1055,7 +1055,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
// yes
msgw = (wchar_t *)&msg[msglen];
} else {
- // no, convert to unciode (allocate stack memory);
+ // no, convert to unciode (allocate stack memory)
if(dbei->flags && DBEF_UTF) {
int size = MultiByteToWideChar(CP_UTF8, 0, (char *) msg, -1, 0, 0);
msgw = (wchar_t *) _alloca(sizeof(wchar_t) * size);