summaryrefslogtreecommitdiff
path: root/MirOTR/svcs_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'MirOTR/svcs_menu.cpp')
-rw-r--r--MirOTR/svcs_menu.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/MirOTR/svcs_menu.cpp b/MirOTR/svcs_menu.cpp
index 3f99834..47900f2 100644
--- a/MirOTR/svcs_menu.cpp
+++ b/MirOTR/svcs_menu.cpp
@@ -28,6 +28,13 @@ int SVC_StartOTR(WPARAM wParam, LPARAM lParam) {
if(options.bHaveMetaContacts && (hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
hContact = hSub;
}
+
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ TCHAR msg[512];
+ mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
+ ShowError(msg);
+ return 0;
+ }
TCHAR buff[512];
mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_REQUEST_OTR), contact_get_nameT(hContact));
@@ -43,6 +50,13 @@ int SVC_RefreshOTR(WPARAM wParam, LPARAM lParam) {
if(options.bHaveMetaContacts && (hSub = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
hContact = hSub;
}
+
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ TCHAR msg[512];
+ mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
+ ShowError(msg);
+ return 0;
+ }
TCHAR buff[512];
mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_TRY_CONTINUE_OTR), contact_get_nameT(hContact));