From 8128db96b8cb2078a82f49fd6026b618560d6d8f Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Mon, 14 Jul 2008 10:54:04 +0000 Subject: reorganised settings overrides git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@418 4f64403b-2f21-0410-a795-97e2b3489a10 --- meta2/proto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta2/proto.cpp') diff --git a/meta2/proto.cpp b/meta2/proto.cpp index a147bc6..8cf504a 100644 --- a/meta2/proto.cpp +++ b/meta2/proto.cpp @@ -169,11 +169,11 @@ int ProtoSendMessage(WPARAM wParam, LPARAM lParam) { strncpy(szServiceName, PSS_MESSAGE "W", sizeof(szServiceName)); } // subcontact does not support utf - convert to old ascii/wide format - if((flags & PREF_UTF) && !(CallContactService(hSendTo, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF)) { + if((flags & PREF_UTF) && (proto == 0 || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF))) { ccs->wParam &= ~PREF_UTF; ccs->wParam |= PREF_UNICODE; wchar_t *unicode = mir_utf8decodeW(message); - char *ascii = mir_u2a(unicode); + char *ascii = mir_u2a_cp(unicode, codepage); char *buff = new char[strlen(ascii) + 1 + (wcslen(unicode) + 1) * sizeof(wchar_t)]; strcpy(buff, ascii); @@ -403,7 +403,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) { void RegisterProto() { PROTOCOLDESCRIPTOR pd = {0}; - pd.cbSize = sizeof(pd); + pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE; //sizeof(pd); pd.szName = MODULE; pd.type = PROTOTYPE_PROTOCOL; CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd); -- cgit v1.2.3