From 88af6e34559efe93fa241323287631b015ef6f25 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 9 Mar 2015 21:52:09 +0000 Subject: [PATCH] Added connection check before sending carbons enable/disable IQ --- src/command/commands.c | 7 +++++++ 1 file changed, 7 insertions(+) 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);