about summary refs log tree commit diff stats
path: root/src/profanity.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-09-22 01:26:40 +0100
committerJames Booth <boothj5@gmail.com>2013-09-22 01:26:40 +0100
commitd70245c8870426382959d9d23199a34e72fc7aa5 (patch)
tree73b0fb53284c0d55eea358e98d18d834cf29ebf0 /src/profanity.c
parentd0c8ed462ddd32ca23a8162a0e5c21f1f25c887b (diff)
downloadprofani-tty-d70245c8870426382959d9d23199a34e72fc7aa5.tar.gz
Fixe rejoining room after nickname conflict
fixes #241
Diffstat (limited to 'src/profanity.c')
-rw-r--r--src/profanity.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/profanity.c b/src/profanity.c
index b18cbe91..bcb59395 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -196,6 +196,11 @@ prof_handle_error_message(const char *from, const char *err_msg)
         } else {
             cons_show_error("Error received from server: %s", err_msg);
         }
+        // remove the room from muc
+        Jid *room_jid = jid_create(from);
+        muc_leave_room(room_jid->barejid);
+        jid_destroy(room_jid);
+
     } else {
         cons_show_error("Error received from server: %s", err_msg);
     }