1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Allow setting /occupants properties when no connected

This commit is contained in:
James Booth 2016-09-26 00:46:09 +01:00
parent 388a20813c
commit b087f84d95

View File

@ -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;