about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-09-08 22:33:48 +0100
committerJames Booth <boothj5@gmail.com>2014-09-08 22:33:48 +0100
commit73ae2e54c5aa6588a192e232c5acccaa359ad382 (patch)
treea85a1f4f9cf8e7425fcd6ab1daa4c31ae8e4d575 /src
parentaf0244580c01998c27fa2def9d106d7f2eb10209 (diff)
downloadprofani-tty-73ae2e54c5aa6588a192e232c5acccaa359ad382.tar.gz
Move to existing room config window if exists
Diffstat (limited to 'src')
-rw-r--r--src/command/commands.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index e6ec9e2d..17eb9157 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1844,7 +1844,16 @@ cmd_room(gchar **args, struct cmd_help_t help)
     }
 
     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;
     }