changeset 1308:b17754d9221b

Show a warning for /otr start|stop, if policy == plain
author franky@veqlargh.fs
date Mon, 10 Sep 2007 19:52:14 +0200
parents 6c116207ab2e
children 887f8801418c
files mcabber/src/otr.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);