about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-05-11 19:32:07 +0100
committerJames Booth <boothj5@gmail.com>2014-05-11 19:32:07 +0100
commit9dda7036a9410a6d2124d3eb6c34eefb7a39a13a (patch)
tree314eef11f733a64b767250889b68359af62d5aa0 /src/command/commands.c
parent6d955609c56a2a303eb141cbd7ba0cc2a364ef37 (diff)
downloadprofani-tty-9dda7036a9410a6d2124d3eb6c34eefb7a39a13a.tar.gz
Implemented per contact OTR policy setting
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 27b03c53..45e1c730 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2689,6 +2689,10 @@ cmd_otr(gchar **args, struct cmd_help_t help)
             cons_show("OTR policy is now set to: %s", choice);
             return TRUE;
         } else {
+            if (jabber_get_connection_status() != JABBER_CONNECTED) {
+                cons_show("You must be connected to set the OTR policy for a contact.");
+                return TRUE;
+            }
             char *contact_jid = roster_barejid_from_name(contact);
             if (contact_jid == NULL) {
                 contact_jid = contact;