Show a warning for /otr start|stop, if policy == plain
authorfranky@veqlargh.fs
Mon, 10 Sep 2007 19:52:14 +0200
changeset 1308 b17754d9221b
parent 1307 6c116207ab2e
child 1309 887f8801418c
Show a warning for /otr start|stop, if policy == plain
mcabber/src/otr.c
--- a/mcabber/src/otr.c	Sun Sep 09 17:44:34 2007 +0200
+++ b/mcabber/src/otr.c	Mon Sep 10 19:52:14 2007 +0200
@@ -186,6 +186,11 @@
 
   if (start) {
     OtrlPolicy policy = cb_policy(NULL, ctx);
+    if (policy == plain) {
+      scr_LogPrint(LPRINT_LOGNORM, "The OTR policy for this user is set to"
+      " plain. You have to change it first.");
+      return;
+    }
     msg = otrl_proto_default_query_msg(ctx->accountname, policy);
     cb_inject_message(NULL, ctx->accountname, ctx->protocol, ctx->username,
                       msg);