From b087f84d955e867b579523a7e4eb33588bfa9b2f Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 26 Sep 2016 00:46:09 +0100 Subject: [PATCH] Allow setting /occupants properties when no connected --- src/command/cmd_funcs.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index c8c79e0c..d79b713c 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -4212,13 +4212,6 @@ cmd_room(ProfWin *window, const char *const command, gchar **args) gboolean cmd_occupants(ProfWin *window, const char *const command, gchar **args) { - jabber_conn_status_t conn_status = connection_get_status(); - - if (conn_status != JABBER_CONNECTED) { - cons_show("You are not currently connected."); - return TRUE; - } - if (g_strcmp0(args[0], "size") == 0) { if (!args[1]) { cons_bad_cmd_usage(command); @@ -4265,6 +4258,12 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args) } } + jabber_conn_status_t conn_status = connection_get_status(); + if (conn_status != JABBER_CONNECTED) { + cons_show("You are not currently connected."); + return TRUE; + } + if (window->type != WIN_MUC) { cons_show("Cannot apply setting when not in chat room."); return TRUE;