about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-03-09 21:52:09 +0000
committerJames Booth <boothj5@gmail.com>2015-03-09 21:52:09 +0000
commit88af6e34559efe93fa241323287631b015ef6f25 (patch)
tree63ef43bac4955794e219f1fb77da4ec4c4de2111 /src
parent945f29873ec6fb275cdaac72f1e6f143650464b5 (diff)
downloadprofani-tty-88af6e34559efe93fa241323287631b015ef6f25.tar.gz
Added connection check before sending carbons enable/disable IQ
Diffstat (limited to 'src')
-rw-r--r--src/command/commands.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 4711c18e..2e466f61 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -3895,6 +3895,13 @@ cmd_history(gchar **args, struct cmd_help_t help)
 gboolean
 cmd_carbons(gchar **args, struct cmd_help_t help)
 {
+    jabber_conn_status_t conn_status = jabber_get_connection_status();
+
+    if (conn_status != JABBER_CONNECTED) {
+        cons_show("You are not currently connected.");
+        return TRUE;
+    }
+
     gboolean result = _cmd_set_boolean_preference(args[0], help,
         "Carbons message", PREF_CARBONS);
 
'>135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206