diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2008-07-14 10:39:27 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2008-07-14 10:39:27 +0000 |
commit | 93ae1d436de6c4816e84002bfdd6a515e00018cb (patch) | |
tree | 21e8aeadead586af389da680c5a8114821525ac8 /otr/dllmain.cpp | |
parent | fa66273266e30033cdabaebaf8341ae901ce8f94 (diff) |
don't mark utf8 messages as unicode
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@415 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'otr/dllmain.cpp')
-rw-r--r-- | otr/dllmain.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp index 368060d..f4711b4 100644 --- a/otr/dllmain.cpp +++ b/otr/dllmain.cpp @@ -295,8 +295,7 @@ extern "C" void otr_gui_inject_message(void *opdata, const char *accountname, co ccs.hContact = hContact;
ccs.szProtoService = PSS_MESSAGE;
ccs.lParam = (LPARAM)Translate(message);
- CallContactService(
- CallService(protocol, PSS_MESSAGE, 0, (LPARAM)&ccs);
+ CallProtoService(protocol, PSS_MESSAGE, 0, (LPARAM)&ccs);
*/
CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)Translate(message));
}
@@ -659,9 +658,14 @@ int OTRSendMessage(WPARAM wParam,LPARAM lParam){ //MessageBox(0, (char *)ccs->lParam, "OTR - sending raw message", MB_OK);
char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)ccs->hContact, 0);
- if(proto && metaproto && strcmp(proto, metaproto) == 0) // bypass for metacontacts
+ if(proto && metaproto && strcmp(proto, metaproto) == 0) {// bypass for metacontacts
+ //PUShowMessage("OTR bypassing metacontact", SM_NOTIFY);
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
- if(!proto) return 1; // error
+ }
+ if(!proto) {
+ //PUShowMessage("OTR error no proto", SM_NOTIFY);
+ return 1; // error
+ }
gcry_error_t err;
char *newmessage = 0;
@@ -700,6 +704,7 @@ int OTRSendMessage(WPARAM wParam,LPARAM lParam){ // don't filter OTR messages being sent (OTR messages should only happen *after* the otrl_message_sending call below)
if(strncmp(oldmessage_utf, "?OTR", 4) == 0) {
free(oldmessage_utf);
+ PUShowMessage("OTR skipping otr message", SM_NOTIFY);
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
}
@@ -813,7 +818,8 @@ int OTRSendMessageW(WPARAM wParam, LPARAM lParam){ if(!lParam) return 0;
CCSDATA *ccs = (CCSDATA *) lParam;
- ccs->wParam |= PREF_UNICODE;
+ if(!(ccs->wParam & PREF_UTF))
+ ccs->wParam |= PREF_UNICODE;
return OTRSendMessage(wParam, lParam);
}
|