changeset 18672:8f9c62a370fb

Commit a patch by bibliochat to handle an XMPP MUC status code that I pushed for adding to the spec and then never updated pidgin to handle. This should let us correctly handle the case where a MUC room assigns us a nickname other than what we requested originally.
author Etan Reisner <pidgin@unreliablesource.net>
date Sat, 28 Jul 2007 04:35:41 +0000
parents 70c758256110
children 1e2e5beb4692
files libpurple/protocols/jabber/presence.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/presence.c	Sat Jul 28 04:27:18 2007 +0000
+++ b/libpurple/protocols/jabber/presence.c	Sat Jul 28 04:35:41 2007 +0000
@@ -372,6 +372,12 @@
 										_("_Configure Room"), G_CALLBACK(jabber_chat_request_room_configure),
 										_("_Accept Defaults"), G_CALLBACK(jabber_chat_create_instant_room));
 						}
+					} else if(code && !strcmp(code, "210")) {
+						/*  server rewrote room-nick */
+						if((chat = jabber_chat_find(js, jid->node, jid->domain))) {
+							g_free(chat->handle);
+							chat->handle = g_strdup(jid->resource);
+						}
 					}
 				}
 				if((z = xmlnode_get_child(y, "item"))) {