summaryrefslogtreecommitdiff
path: root/otr/dllmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'otr/dllmain.cpp')
-rw-r--r--otr/dllmain.cpp31
1 files changed, 10 insertions, 21 deletions
diff --git a/otr/dllmain.cpp b/otr/dllmain.cpp
index 708c4ae..878688e 100644
--- a/otr/dllmain.cpp
+++ b/otr/dllmain.cpp
@@ -302,16 +302,13 @@ extern "C" void otr_gui_notify(void *opdata, OtrlNotifyLevel level, const char *
* as a received message, or else by using the above notify()
* callback. */
extern "C" int otr_gui_display_otr_message(void *opdata, const char *accountname, const char *protocol, const char *username, const char *msg) {
- /*
- * char buff[512];
- * mir_snprintf(buff, 512, Translate("%s(%s)"), protocol, username);
- *ShowPopup(buff, msg, 0);
-
- return 0;
- */
- //return 1;
-
- ShowMessageInline((HANDLE)opdata, Translate(msg));
+ if(options.msg_inline) {
+ ShowMessageInline((HANDLE)opdata, Translate(msg));
+ } else {
+ char buff[512];
+ mir_snprintf(buff, 512, Translate("%s (%s)"), protocol, username);
+ ShowPopup(buff, msg, 0);
+ }
return 0;
}
@@ -419,7 +416,7 @@ extern "C" void otr_gui_gone_secure(void *opdata, ConnContext *context) {
} else {
CloseHandle((HANDLE)_beginthreadex(0, 0, verify_fp_thread, context, 0, 0));
- mir_snprintf(buff, 1024, Translate("Beginning OTR encrypted session with '%s'"), context->username);
+ mir_snprintf(buff, 1024, Translate("Beginning OTR encrypted session with '%s' (NOT VERIFIED)"), context->username);
//MessageBox(0, buff, Translate("OTR Information"), MB_OK);
if(options.msg_inline)
ShowMessageInline((HANDLE)opdata, buff);
@@ -502,16 +499,8 @@ void CALLBACK ClearFinishedSessions(HWND, UINT, UINT, DWORD) {
while(context) {
if(context->msgstate == OTRL_MSGSTATE_FINISHED) {
hContact = context->app_data;
-
- char *uproto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- char *uname = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
- if(uproto && uname)
- otrl_message_disconnect(otr_user_state, &ops, hContact, MODULE, uproto, uname);
-
- //otrl_context_force_finished(context);
-
- SetEncryptionStatus(hContact, false);
-
+ otrl_context_force_plaintext(context);
+ SetEncryptionStatus(hContact, false);
}
context = context->next;
}