Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/otr.c @ 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 | cb400799db8f |
comparison
equal
deleted
inserted
replaced
1307:6c116207ab2e | 1308:b17754d9221b |
---|---|
184 if (start && ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED) | 184 if (start && ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED) |
185 otr_message_disconnect(ctx); | 185 otr_message_disconnect(ctx); |
186 | 186 |
187 if (start) { | 187 if (start) { |
188 OtrlPolicy policy = cb_policy(NULL, ctx); | 188 OtrlPolicy policy = cb_policy(NULL, ctx); |
189 if (policy == plain) { | |
190 scr_LogPrint(LPRINT_LOGNORM, "The OTR policy for this user is set to" | |
191 " plain. You have to change it first."); | |
192 return; | |
193 } | |
189 msg = otrl_proto_default_query_msg(ctx->accountname, policy); | 194 msg = otrl_proto_default_query_msg(ctx->accountname, policy); |
190 cb_inject_message(NULL, ctx->accountname, ctx->protocol, ctx->username, | 195 cb_inject_message(NULL, ctx->accountname, ctx->protocol, ctx->username, |
191 msg); | 196 msg); |
192 free (msg); | 197 free (msg); |
193 } | 198 } |