summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--otr/dllmain.cpp13
-rw-r--r--otr/otr.mdsp21
-rw-r--r--otr/otr_private.h6
3 files changed, 26 insertions, 14 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp
index c254fcc..368060d 100644
--- a/otr/dllmain.cpp
+++ b/otr/dllmain.cpp
@@ -288,12 +288,17 @@ extern "C" void otr_gui_inject_message(void *opdata, const char *accountname, co
HANDLE hContact = (HANDLE)opdata;
// bypass filters (including this module, metacontacts, etc) - go direct to proto level
+ // mod for new account stuff - OTRSendMessage will ignore messages starting with "?OTR" - 'new' protocols expect args (flags, char *) instead of (0, CSSDATA*)
if(protocol && DBGetContactSettingWord(hContact, protocol, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
+ /*
CCSDATA ccs = {0};
ccs.hContact = hContact;
ccs.szProtoService = PSS_MESSAGE;
ccs.lParam = (LPARAM)Translate(message);
- CallProtoService(protocol, PSS_MESSAGE, 0, (LPARAM)&ccs);
+ CallContactService(
+ CallService(protocol, PSS_MESSAGE, 0, (LPARAM)&ccs);
+ */
+ CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)Translate(message));
}
}
@@ -691,6 +696,12 @@ int OTRSendMessage(WPARAM wParam,LPARAM lParam){
free(temp);
}
+
+ // 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);
+ return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
+ }
char *username = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)ccs->hContact, 0);
// check if we're waiting for the other side to accept a new key from us
diff --git a/otr/otr.mdsp b/otr/otr.mdsp
index f182148..873f005 100644
--- a/otr/otr.mdsp
+++ b/otr/otr.mdsp
@@ -124,14 +124,15 @@ extraResourceOptions=
25=..\..\..\..\..\..\..\msys\home\sje\libotr\src\userstate.h
26=..\..\..\..\..\..\..\msys\home\sje\libotr\src\version.h
[History]
-..\..\..\..\..\..\..\msys\home\sje\libotr\src\context.h,1839
-..\..\..\..\..\..\..\msys\home\sje\libotr\src\version.h,0
-..\..\..\..\..\..\..\msys\home\sje\libotr\src\proto.c,1504
-common.h,1593
-..\..\..\..\..\..\..\msys\home\sje\libotr\src\proto.h,0
-..\..\..\..\..\..\..\msys\home\sje\libotr\src\message.h,9228
-dllmain.cpp,47892
-menu.cpp,995
-options.cpp,9854
.svn\text-base\dllmain.cpp.svn-base,34873
-otr_private.h,97
+options.cpp,9854
+menu.cpp,995
+dllmain.cpp,9853
+..\..\..\..\..\..\..\msys\home\sje\libotr\src\message.h,9228
+..\..\..\..\..\..\..\msys\home\sje\libotr\src\proto.h,0
+common.h,1593
+..\..\..\..\..\..\..\msys\home\sje\libotr\src\proto.c,1504
+..\..\..\..\..\..\..\msys\home\sje\libotr\src\version.h,0
+..\..\..\..\..\..\..\msys\home\sje\libotr\src\context.h,1839
+utils.cpp,0
+otr_private.h,171
diff --git a/otr/otr_private.h b/otr/otr_private.h
index 6e18b13..b153bc1 100644
--- a/otr/otr_private.h
+++ b/otr/otr_private.h
@@ -3,9 +3,9 @@
/* VERSION DEFINITIONS */
#define VER_MAJOR 0
-#define VER_MINOR 6
-#define VER_RELEASE 0
-#define VER_BUILD 4
+#define VER_MINOR 7
+#define VER_RELEASE 0
+#define VER_BUILD 0
#define __STRINGIZE(x) #x
#define VER_STRING __STRINGIZE( VER_MAJOR.VER_MINOR.VER_RELEASE.VER_BUILD )