about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-21 00:37:04 +0100
committerJames Booth <boothj5@gmail.com>2014-04-21 00:37:04 +0100
commit2c15aba92a8288e41bea6e12933a14ffe390e1f4 (patch)
tree6e0efc0358f712a2e991259a0fbf2bf0c941cb61 /src/command
parent9a55d8ad193e79c38d59c9448330132f1c874bca (diff)
downloadprofani-tty-2c15aba92a8288e41bea6e12933a14ffe390e1f4.tar.gz
Chat room windows now created only after successful join
Diffstat (limited to 'src/command')
-rw-r--r--src/command/commands.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 8e026b50..0a96d318 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1591,9 +1591,10 @@ cmd_join(gchar **args, struct cmd_help_t help)
 
     if (!muc_room_is_active(room)) {
         presence_join_room(room, nick, passwd);
+        muc_join_room(room, nick, passwd, FALSE);
+    } else if (muc_get_roster_received(room)) {
+        ui_room_join(room, TRUE);
     }
-    ui_room_join(room, TRUE);
-    muc_remove_invite(room);
 
     jid_destroy(room_arg);
     g_string_free(room_str, TRUE);