diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-29 14:19:25 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-29 14:19:25 +0000 |
commit | 2d5acb9afe2fe861f7af1cdd7349056c97173ced (patch) | |
tree | 6bac40f2960e64e89f96ad918fe95cd2179a859f | |
parent | 8d2322e9200357df2fd873d385f99febad35effd (diff) |
handle UTF messages
upgrade to libotr 3.1.0
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@306 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | otr/dllmain.cpp | 8 | ||||
-rw-r--r-- | otr/otr.mdsp | 11 | ||||
-rw-r--r-- | otr/otr_private.h | 6 |
3 files changed, 10 insertions, 15 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp index 26300bb..b6291cf 100644 --- a/otr/dllmain.cpp +++ b/otr/dllmain.cpp @@ -629,7 +629,9 @@ int OTRSendMessage(WPARAM wParam,LPARAM lParam){ //MessageBox(0, "Send message - converting to UTF-8", "msg", MB_OK);
- if(ccs->wParam & PREF_UNICODE) {
+ if(ccs->wParam & PREF_UTF) {
+ oldmessage_utf = strdup(oldmessage);
+ } else if(ccs->wParam & PREF_UNICODE) {
int size = WideCharToMultiByte(CP_UTF8, 0, (wchar_t *)&oldmessage[strlen(oldmessage)+1], -1, 0, 0, 0, 0);
oldmessage_utf = (char *)malloc(size);
if(!oldmessage_utf) return 1;
@@ -786,7 +788,9 @@ int RecvMessage(WPARAM wParam,LPARAM lParam){ if(!proto || !uname) return 1; // error
// convert oldmessage to utf-8
- if(ccs->wParam & PREF_UNICODE) {
+ if(ccs->wParam & PREF_UTF) {
+ oldmessage_utf = strdup(oldmessage);
+ } else if(ccs->wParam & PREF_UNICODE) {
int size = WideCharToMultiByte(CP_UTF8, 0, (wchar_t *)&oldmessage[strlen(oldmessage)+1], -1, 0, 0, 0, 0);
oldmessage_utf = (char *)malloc(size);
if(!oldmessage_utf) return 1;
diff --git a/otr/otr.mdsp b/otr/otr.mdsp index 53a08f9..d4b77ec 100644 --- a/otr/otr.mdsp +++ b/otr/otr.mdsp @@ -129,13 +129,4 @@ extraResourceOptions= 30=..\..\include\m_updater.h
31=..\..\include\m_database.h
[History]
-dllmain.cpp,0
-..\..\include\m_database.h,16842
-..\..\include\m_protomod.h,0
-..\..\include\m_protocols.h,0
-..\..\include\m_protosvc.h,21646
-utils.cpp,41
-common.h,414
-..\..\include\m_yapp.h,1938
-utils.h,0
-otr_private.h,171
+otr_private.h,534
diff --git a/otr/otr_private.h b/otr/otr_private.h index 1b53236..fdc2777 100644 --- a/otr/otr_private.h +++ b/otr/otr_private.h @@ -4,8 +4,8 @@ /* VERSION DEFINITIONS */
#define VER_MAJOR 0
#define VER_MINOR 5
-#define VER_RELEASE 5
-#define VER_BUILD 2
+#define VER_RELEASE 7
+#define VER_BUILD 0
#define __STRINGIZE(x) #x
#define VER_STRING __STRINGIZE( VER_MAJOR.VER_MINOR.VER_RELEASE.VER_BUILD )
@@ -15,7 +15,7 @@ #define FILE_VERSION VER_STRING
#define FILE_DESCRIPTION DESC_STRING
#define INTERNAL_NAME ""
-#define LEGAL_COPYRIGHT "© Scott Ellis 2005"
+#define LEGAL_COPYRIGHT "© Scott Ellis 2005-2007"
#define LEGAL_TRADEMARKS ""
#define ORIGINAL_FILENAME "otr.dll"
#define PRODUCT_NAME DESC_STRING
|