mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Move to existing room config window if exists
This commit is contained in:
parent
af0244580c
commit
73ae2e54c5
@ -1844,7 +1844,16 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcmp0(args[1], "edit") == 0) {
|
if (g_strcmp0(args[1], "edit") == 0) {
|
||||||
iq_request_room_config_form(room);
|
GString *win_title = g_string_new(room);
|
||||||
|
g_string_append(win_title, " config");
|
||||||
|
ProfWin *window = wins_get_by_recipient(win_title->str);
|
||||||
|
g_string_free(win_title, TRUE);
|
||||||
|
if (window != NULL) {
|
||||||
|
int num = wins_get_num(window);
|
||||||
|
ui_switch_win(num);
|
||||||
|
} else {
|
||||||
|
iq_request_room_config_form(room);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user