changeset 26808:8cb3403430bb

merge of '2481b51dce05a40973c023cb3c62c66b082e11bf' and '747f7586a776a69a1fba475128617b8bfe6a649b'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 03 May 2009 23:09:57 +0000
parents df7505e0d64a (current diff) 8d47c0d594dc (diff)
children 18129e760e10
files
diffstat 11 files changed, 545 insertions(+), 533 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun May 03 23:02:31 2009 +0000
+++ b/ChangeLog	Sun May 03 23:09:57 2009 +0000
@@ -31,6 +31,8 @@
 	* Support most recent version of User Avatar. (XEP-0084 v1.1)
 	* Updated Entity Capabilities support. (Tobias Markmann)
 	* Better support for receiving remote users' nicknames.
+	* /affiliate and /role will now list the room members with the specified
+	  affiliation/role if possible. (Andrei Mozzhuhin)
 
 	Yahoo:
 	* P2P file transfers. (Sulabh Mahajan)
--- a/libpurple/protocols/jabber/caps.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/caps.c	Sun May 03 23:09:57 2009 +0000
@@ -349,7 +349,7 @@
 	}
 	g_hash_table_destroy(capstable);
 	g_hash_table_destroy(nodetable);
-	capstable = NULL;
+	capstable = nodetable = NULL;
 }
 
 typedef struct _jabber_caps_cbplususerdata {
--- a/libpurple/protocols/jabber/chat.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/chat.c	Sun May 03 23:09:57 2009 +0000
@@ -916,6 +916,68 @@
 	return TRUE;
 }
 
+static void
+jabber_chat_affiliation_list_cb(JabberStream *js, const char *from,
+                                JabberIqType type, const char *id,
+                                xmlnode *packet, gpointer data)
+{
+	JabberChat *chat;
+	xmlnode *query, *item;
+	int chat_id = GPOINTER_TO_INT(data);
+	GString *buf;
+
+	if(!(chat = jabber_chat_find_by_id(js, chat_id)))
+		return;
+
+	if (type == JABBER_IQ_ERROR)
+		return;
+
+	if(!(query = xmlnode_get_child(packet, "query")))
+		return;
+
+	buf = g_string_new(_("Affiliations:"));
+
+	item = xmlnode_get_child(query, "item");
+	if (item) {
+		for( ; item; item = xmlnode_get_next_twin(item)) {
+			const char *jid = xmlnode_get_attrib(item, "jid");
+			const char *affiliation = xmlnode_get_attrib(item, "affiliation");
+			if (jid && affiliation)
+				g_string_append_printf(buf, "\n%s %s", jid, affiliation);
+		}
+    } else {
+		buf = g_string_append_c(buf, '\n');
+		buf = g_string_append_len(buf, _("No users found"), -1);
+	}
+
+	purple_conv_chat_write(PURPLE_CONV_CHAT(chat->conv), "", buf->str,
+    	PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LOG, time(NULL));
+
+	g_string_free(buf, TRUE);
+}
+
+gboolean jabber_chat_affiliation_list(JabberChat *chat, const char *affiliation)
+{
+	JabberIq *iq;
+	char *room_jid;
+	xmlnode *query, *item;
+
+	iq = jabber_iq_new_query(chat->js, JABBER_IQ_GET,
+			"http://jabber.org/protocol/muc#admin");
+
+	room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
+	xmlnode_set_attrib(iq->node, "to", room_jid);
+
+	query = xmlnode_get_child(iq->node, "query");
+	item = xmlnode_new_child(query, "item");
+	xmlnode_set_attrib(item, "affiliation", affiliation);
+
+	jabber_iq_set_callback(iq, jabber_chat_affiliation_list_cb, GINT_TO_POINTER(chat->id));
+	jabber_iq_send(iq);
+
+	return TRUE;
+}
+
 gboolean jabber_chat_role_user(JabberChat *chat, const char *who, const char *role)
 {
 	char *to;
@@ -945,6 +1007,67 @@
 	return TRUE;
 }
 
+static void jabber_chat_role_list_cb(JabberStream *js, const char *from,
+                                     JabberIqType type, const char *id,
+                                     xmlnode *packet, gpointer data)
+{
+	JabberChat *chat;
+	xmlnode *query, *item;
+	int chat_id = GPOINTER_TO_INT(data);
+	GString *buf;
+
+	if(!(chat = jabber_chat_find_by_id(js, chat_id)))
+		return;
+
+	if (type == JABBER_IQ_ERROR)
+		return;
+
+	if(!(query = xmlnode_get_child(packet, "query")))
+		return;
+
+	buf = g_string_new(_("Roles:"));
+
+	item = xmlnode_get_child(query, "item");
+	if (item) {
+		for( ; item; item = xmlnode_get_next_twin(item)) {
+			const char *jid  = xmlnode_get_attrib(item, "jid");
+			const char *role = xmlnode_get_attrib(item, "role");
+			if (jid && role)
+				g_string_append_printf(buf, "\n%s %s", jid, role);
+	    }
+	} else {
+		buf = g_string_append_c(buf, '\n');
+		buf = g_string_append_len(buf, _("No users found"), -1);
+	}
+
+	purple_conv_chat_write(PURPLE_CONV_CHAT(chat->conv), "", buf->str,
+    	PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LOG, time(NULL));
+
+	g_string_free(buf, TRUE);
+}
+
+gboolean jabber_chat_role_list(JabberChat *chat, const char *role)
+{
+	JabberIq *iq;
+	char *room_jid;
+	xmlnode *query, *item;
+
+	iq = jabber_iq_new_query(chat->js, JABBER_IQ_GET,
+			"http://jabber.org/protocol/muc#admin");
+
+	room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
+	xmlnode_set_attrib(iq->node, "to", room_jid);
+
+	query = xmlnode_get_child(iq->node, "query");
+	item = xmlnode_new_child(query, "item");
+	xmlnode_set_attrib(item, "role", role);
+
+	jabber_iq_set_callback(iq, jabber_chat_role_list_cb, GINT_TO_POINTER(chat->id));
+	jabber_iq_send(iq);
+
+	return TRUE;
+}
+
 gboolean jabber_chat_kick_user(JabberChat *chat, const char *who, const char *why)
 {
 	JabberIq *iq;
--- a/libpurple/protocols/jabber/chat.h	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/chat.h	Sun May 03 23:09:57 2009 +0000
@@ -81,8 +81,10 @@
 		const char *why);
 gboolean jabber_chat_affiliate_user(JabberChat *chat, const char *who,
 		const char *affiliation);
+gboolean jabber_chat_affiliation_list(JabberChat *chat, const char *affiliation);
 gboolean jabber_chat_role_user(JabberChat *chat, const char *who,
 		const char *role);
+gboolean jabber_chat_role_list(JabberChat *chat, const char *role);
 gboolean jabber_chat_kick_user(JabberChat *chat, const char *who,
 		const char *why);
 
--- a/libpurple/protocols/jabber/ibb.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/ibb.c	Sun May 03 23:09:57 2009 +0000
@@ -503,6 +503,8 @@
 {
 	jabber_ibb_sessions = g_hash_table_new(g_str_hash, g_str_equal);
 
+	jabber_add_feature(XEP_0047_NAMESPACE, NULL);
+
 	jabber_iq_register_handler("close", XEP_0047_NAMESPACE, jabber_ibb_parse);
 	jabber_iq_register_handler("data", XEP_0047_NAMESPACE, jabber_ibb_parse);
 	jabber_iq_register_handler("open", XEP_0047_NAMESPACE, jabber_ibb_parse);
--- a/libpurple/protocols/jabber/jabber.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Sun May 03 23:09:57 2009 +0000
@@ -70,6 +70,7 @@
 static PurplePlugin *my_protocol = NULL;
 GList *jabber_features = NULL;
 GList *jabber_identities = NULL;
+GSList *jabber_cmds = NULL;
 
 static void jabber_unregister_account_cb(JabberStream *js);
 static void try_srv_connect(JabberStream *js);
@@ -2590,21 +2591,32 @@
 {
 	JabberChat *chat = jabber_chat_find_by_conv(conv);
 
-	if (!chat || !args || !args[0] || !args[1])
+	if (!chat || !args || !args[0])
 		return PURPLE_CMD_RET_FAILED;
 
-	if (strcmp(args[1], "owner") != 0 &&
-	    strcmp(args[1], "admin") != 0 &&
-	    strcmp(args[1], "member") != 0 &&
-	    strcmp(args[1], "outcast") != 0 &&
-	    strcmp(args[1], "none") != 0) {
-		*error = g_strdup_printf(_("Unknown affiliation: \"%s\""), args[1]);
+	if (strcmp(args[0], "owner") != 0 &&
+	    strcmp(args[0], "admin") != 0 &&
+	    strcmp(args[0], "member") != 0 &&
+	    strcmp(args[0], "outcast") != 0 &&
+	    strcmp(args[0], "none") != 0) {
+		*error = g_strdup_printf(_("Unknown affiliation: \"%s\""), args[0]);
 		return PURPLE_CMD_RET_FAILED;
 	}
 
-	if (!jabber_chat_affiliate_user(chat, args[0], args[1])) {
-		*error = g_strdup_printf(_("Unable to affiliate user %s as \"%s\""), args[0], args[1]);
-		return PURPLE_CMD_RET_FAILED;
+	if (args[1]) {
+		int i;
+		char **nicks = g_strsplit(args[1], " ", -1);
+
+		for (i = 0; nicks[i]; ++i)
+			if (!jabber_chat_affiliate_user(chat, nicks[i], args[0])) {
+				*error = g_strdup_printf(_("Unable to affiliate user %s as \"%s\""), nicks[i], args[0]);
+				g_strfreev(nicks);
+				return PURPLE_CMD_RET_FAILED;
+			}
+
+		g_strfreev(nicks);
+	} else {
+		jabber_chat_affiliation_list(chat, args[0]);
 	}
 
 	return PURPLE_CMD_RET_OK;
@@ -2615,23 +2627,32 @@
 {
 	JabberChat *chat = jabber_chat_find_by_conv(conv);
 
-	if (!chat || !args || !args[0] || !args[1])
+	if (!chat || !args || !args[0])
 		return PURPLE_CMD_RET_FAILED;
 
-	if (strcmp(args[1], "moderator") != 0 &&
-	    strcmp(args[1], "participant") != 0 &&
-	    strcmp(args[1], "visitor") != 0 &&
-	    strcmp(args[1], "none") != 0) {
-		*error = g_strdup_printf(_("Unknown role: \"%s\""), args[1]);
+	if (strcmp(args[0], "moderator") != 0 &&
+	    strcmp(args[0], "participant") != 0 &&
+	    strcmp(args[0], "visitor") != 0 &&
+	    strcmp(args[0], "none") != 0) {
+		*error = g_strdup_printf(_("Unknown role: \"%s\""), args[0]);
 		return PURPLE_CMD_RET_FAILED;
 	}
 
-	if (!jabber_chat_role_user(chat, args[0], args[1])) {
-		*error = g_strdup_printf(_("Unable to set role \"%s\" for user: %s"),
-		                         args[1], args[0]);
-		return PURPLE_CMD_RET_FAILED;
+	if (args[1]) {
+		int i;
+		char **nicks = g_strsplit(args[1], " ", -1);
+
+		for (i = 0; nicks[i]; i++)
+			if (!jabber_chat_role_user(chat, nicks[i], args[0])) {
+				*error = g_strdup_printf(_("Unable to set role \"%s\" for user: %s"),
+										 args[0], nicks[i]);
+				return PURPLE_CMD_RET_FAILED;
+			}
+
+		g_strfreev(nicks);
+	} else {
+		jabber_chat_role_list(chat, args[0]);
 	}
-
 	return PURPLE_CMD_RET_OK;
 }
 
@@ -3139,89 +3160,126 @@
 
 void jabber_register_commands(void)
 {
-	purple_cmd_register("config", "", PURPLE_CMD_P_PRPL,
+	PurpleCmdId id;
+	id = purple_cmd_register("config", "", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
 	                  "prpl-jabber", jabber_cmd_chat_config,
 	                  _("config:  Configure a chat room."), NULL);
-	purple_cmd_register("configure", "", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("configure", "", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
 	                  "prpl-jabber", jabber_cmd_chat_config,
 	                  _("configure:  Configure a chat room."), NULL);
-	purple_cmd_register("nick", "s", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("nick", "s", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
 	                  "prpl-jabber", jabber_cmd_chat_nick,
 	                  _("nick &lt;new nickname&gt;:  Change your nickname."),
 	                  NULL);
-	purple_cmd_register("part", "s", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("part", "s", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_part, _("part [room]:  Leave the room."),
 	                  NULL);
-	purple_cmd_register("register", "", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("register", "", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
 	                  "prpl-jabber", jabber_cmd_chat_register,
 	                  _("register:  Register with a chat room."), NULL);
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
 	/* XXX: there needs to be a core /topic cmd, methinks */
-	purple_cmd_register("topic", "s", PURPLE_CMD_P_PRPL,
+	id = purple_cmd_register("topic", "s", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_topic,
 	                  _("topic [new topic]:  View or change the topic."),
 	                  NULL);
-	purple_cmd_register("ban", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("ban", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_ban,
 	                  _("ban &lt;user&gt; [reason]:  Ban a user from the room."),
 	                  NULL);
-	purple_cmd_register("affiliate", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("affiliate", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_affiliate,
-	                  _("affiliate &lt;user&gt; &lt;owner|admin|member|outcast|none&gt;: Set a user's affiliation with the room."),
+	                  _("affiliate &lt;owner|admin|member|outcast|none&gt; [nick1] [nick2] ...: Get the users with an affiliation or set users' affiliation with the room."),
 	                  NULL);
-	purple_cmd_register("role", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("role", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_role,
-	                  _("role &lt;user&gt; &lt;moderator|participant|visitor|none&gt;: Set a user's role in the room."),
+	                  _("role &lt;moderator|participant|visitor|none&gt; [nick1] [nick2] ...: Get the users with an role or set users' role with the room."),
 	                  NULL);
-	purple_cmd_register("invite", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("invite", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_invite,
 	                  _("invite &lt;user&gt; [message]:  Invite a user to the room."),
 	                  NULL);
-	purple_cmd_register("join", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("join", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_join,
 	                  _("join: &lt;room&gt; [password]:  Join a chat on this server."),
 	                  NULL);
-	purple_cmd_register("kick", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("kick", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY |
 	                  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS, "prpl-jabber",
 	                  jabber_cmd_chat_kick,
 	                  _("kick &lt;user&gt; [reason]:  Kick a user from the room."),
 	                  NULL);
-	purple_cmd_register("msg", "ws", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("msg", "ws", PURPLE_CMD_P_PRPL,
 	                  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
 	                  "prpl-jabber", jabber_cmd_chat_msg,
 	                  _("msg &lt;user&gt; &lt;message&gt;:  Send a private message to another user."),
 	                  NULL);
-	purple_cmd_register("ping", "w", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("ping", "w", PURPLE_CMD_P_PRPL,
 					  PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_IM |
 					  PURPLE_CMD_FLAG_PRPL_ONLY,
 					  "prpl-jabber", jabber_cmd_ping,
 					  _("ping &lt;jid&gt;:	Ping a user/component/server."),
 					  NULL);
-	purple_cmd_register("buzz", "w", PURPLE_CMD_P_PRPL,
+	jabber_cmds = g_slist_prepend(jabber_cmds, GUINT_TO_POINTER(id));
+
+	id = purple_cmd_register("buzz", "w", PURPLE_CMD_P_PRPL,
 					  PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_PRPL_ONLY |
 					  PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS,
 					  "prpl-jabber", jabber_cmd_buzz,
 					  _("buzz: Buzz a user to get their attention"), NULL);
 }
 
+void jabber_unregister_commands(void)
+{
+	while (jabber_cmds != NULL) {
+		purple_cmd_unregister(GPOINTER_TO_UINT(jabber_cmds->data));
+		jabber_cmds = g_slist_delete_link(jabber_cmds, jabber_cmds);
+	}
+}
+
 /* IPC functions */
 
 /**
@@ -3297,6 +3355,12 @@
 	jabber_add_feature("http://jabber.org/protocol/xhtml-im", 0);
 	jabber_add_feature("urn:xmpp:ping", 0);
 
+	/* Buzz/Attention */
+	jabber_add_feature(XEP_0224_NAMESPACE, jabber_buzz_isenabled);
+
+	/* Bits Of Binary */
+	jabber_add_feature(XEP_0231_NAMESPACE, jabber_custom_smileys_isenabled);
+
 	/* Jingle features! */
 	jabber_add_feature(JINGLE, 0);
 	jabber_add_feature(JINGLE_TRANSPORT_RAWUDP, 0);
--- a/libpurple/protocols/jabber/jabber.h	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Sun May 03 23:09:57 2009 +0000
@@ -366,6 +366,7 @@
 PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who);
 
 void jabber_register_commands(void);
+void jabber_unregister_commands(void);
 
 void jabber_init_plugin(PurplePlugin *plugin);
 void jabber_uninit_plugin(void);
--- a/libpurple/protocols/jabber/libxmpp.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/libxmpp.c	Sun May 03 23:09:57 2009 +0000
@@ -161,6 +161,8 @@
 	jabber_caps_uninit();
 	jabber_iq_uninit();
 
+	jabber_unregister_commands();
+
 	/* Stay on target...stay on target... Almost there... */
 	jabber_uninit_plugin();
 
@@ -298,10 +300,6 @@
 
 	jabber_ibb_init();
 	jabber_si_init();
-
-	jabber_add_feature(XEP_0224_NAMESPACE, jabber_buzz_isenabled);
-	jabber_add_feature(XEP_0231_NAMESPACE, jabber_custom_smileys_isenabled);
-	jabber_add_feature(XEP_0047_NAMESPACE, NULL);
 }
 
 
--- a/libpurple/protocols/jabber/pep.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/jabber/pep.c	Sun May 03 23:09:57 2009 +0000
@@ -44,7 +44,10 @@
 }
 
 void jabber_pep_uninit(void) {
-	/* any PEP handlers that need to clean things up go here */
+	/* any PEP handlers that need to clean things up go here. The standard
+	 * cleanup of removing the handler and feature are handled here and by
+	 * jabber_features_destroy() in jabber.c
+	 */
 	g_hash_table_destroy(pep_handlers);
 	pep_handlers = NULL;
 }
--- a/libpurple/protocols/qq/qq_crypt.c	Sun May 03 23:02:31 2009 +0000
+++ b/libpurple/protocols/qq/qq_crypt.c	Sun May 03 23:09:57 2009 +0000
@@ -275,7 +275,7 @@
 	}
 	
 	count64 = crypted_len / 8;
-	while (count64-- > 0){
+	while (--count64 > 0){
 		c32_prev[0] = crypted32[0]; c32_prev[1] = crypted32[1];
 		crypted_ptr += 8;
 
--- a/po/ca.po	Sun May 03 23:02:31 2009 +0000
+++ b/po/ca.po	Sun May 03 23:09:57 2009 +0000
@@ -33,8 +33,8 @@
 msgstr ""
 "Project-Id-Version: Pidgin\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-04-30 10:37-0400\n"
-"PO-Revision-Date: 2009-03-05 22:37+0100\n"
+"POT-Creation-Date: 2009-05-03 18:12+0200\n"
+"PO-Revision-Date: 2009-05-03 18:15+0200\n"
 "Last-Translator: Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>\n"
 "Language-Team: Catalan <tradgnome@softcatala.net>\n"
 "MIME-Version: 1.0\n"
@@ -639,6 +639,19 @@
 msgid "Send To"
 msgstr "Envia a"
 
+msgid "Invite message"
+msgstr "Missatge d'invitació"
+
+msgid "Invite"
+msgstr "Convida"
+
+msgid ""
+"Please enter the name of the user you wish to invite,\n"
+"along with an optional invite message."
+msgstr ""
+"Introduïu el nom de l'usuari que vulgueu convidar,\n"
+"així com un missatge d'invitació opcional."
+
 msgid "Conversation"
 msgstr "Conversa"
 
@@ -902,41 +915,6 @@
 msgid "System Log"
 msgstr "Registre del sistema"
 
-#, fuzzy
-msgid "Calling ... "
-msgstr "S'està calculant..."
-
-msgid "Hangup"
-msgstr ""
-
-#. Number of actions
-msgid "Accept"
-msgstr "Accepta"
-
-msgid "Reject"
-msgstr "Rebutja"
-
-msgid "Call in progress."
-msgstr ""
-
-msgid "The call has been terminated."
-msgstr ""
-
-#, c-format
-msgid "%s wishes to start an audio session with you."
-msgstr ""
-
-#, c-format
-msgid "%s is trying to start an unsupported media session type with you."
-msgstr ""
-
-#, fuzzy
-msgid "You have rejected the call."
-msgstr "Heu sortit del canal%s%s"
-
-msgid "call: Make an audio call."
-msgstr ""
-
 msgid "Emails"
 msgstr "Correus electrònics"
 
@@ -971,9 +949,6 @@
 msgid "IM"
 msgstr "MI"
 
-msgid "Invite"
-msgstr "Convida"
-
 msgid "(none)"
 msgstr "(cap)"
 
@@ -1589,28 +1564,6 @@
 msgid "Lastlog plugin."
 msgstr "Connector lastlog."
 
-#, c-format
-msgid ""
-"\n"
-"Fetching TinyURL..."
-msgstr ""
-
-msgid "Only create TinyURL for urls of this length or greater"
-msgstr ""
-
-msgid "TinyURL (or other) address prefix"
-msgstr ""
-
-#, fuzzy
-msgid "TinyURL"
-msgstr "URL de la melodia"
-
-msgid "TinyURL plugin"
-msgstr ""
-
-msgid "When receiving a message with URL(s), TinyURL for easier copying"
-msgstr ""
-
 msgid "accounts"
 msgstr "comptes"
 
@@ -1712,6 +1665,13 @@
 msgid "SSL Certificate Verification"
 msgstr "Verificació d'un certificat SSL"
 
+#. Number of actions
+msgid "Accept"
+msgstr "Accepta"
+
+msgid "Reject"
+msgstr "Rebutja"
+
 msgid "_View Certificate..."
 msgstr "_Mostra el certificat..."
 
@@ -1860,18 +1820,6 @@
 msgid "%s left the room (%s)."
 msgstr "%s ha sortit de la sala (%s)."
 
-#, fuzzy
-msgid "Invite to chat"
-msgstr "Convida a la conferència"
-
-#. Put our happy label in it.
-msgid ""
-"Please enter the name of the user you wish to invite, along with an optional "
-"invite message."
-msgstr ""
-"Introduïu el nom de l'usuari que vulgueu convidar, així com un missatge "
-"d'invitació opcional."
-
 #, c-format
 msgid "Failed to get connection: %s"
 msgstr "No s'ha pogut obtenir la connexió: %s"
@@ -2705,32 +2653,6 @@
 msgid "Do not ask. Always save in pounce."
 msgstr "No ho demanis, desa-ho sempre en un avís."
 
-#, fuzzy
-msgid "One Time Password"
-msgstr "Introduïu la contrasenya"
-
-#. *< type
-#. *< ui_requirement
-#. *< flags
-#. *< dependencies
-#. *< priority
-#. *< id
-msgid "One Time Password Support"
-msgstr ""
-
-#. *< name
-#. *< version
-#. *  summary
-msgid "Enforce that passwords are used only once."
-msgstr ""
-
-#. *  description
-msgid ""
-"Allows you to enforce on a per-account basis that passwords not being saved "
-"are only used in a single successful connection.\n"
-"Note: The account password must not be saved for this to work."
-msgstr ""
-
 #. *< type
 #. *< ui_requirement
 #. *< flags
@@ -3133,7 +3055,6 @@
 msgid "Add to chat..."
 msgstr "Afegeix al xat..."
 
-#. Global
 msgid "Available"
 msgstr "Disponible"
 
@@ -3480,17 +3401,6 @@
 "El servidor ha rebutjat el nom del compte que heu triat. Possiblement conté "
 "caràcters invàlids."
 
-#. We only want to do the following dance if the connection
-#. has not been successfully completed.  If it has, just
-#. notify the user that their /nick command didn't go.
-#, fuzzy, c-format
-msgid "The nickname \"%s\" is already being used."
-msgstr "Aquest nom de xat ja existeix"
-
-#, fuzzy
-msgid "Nickname in use"
-msgstr "Sobrenom: %s\n"
-
 msgid "Cannot change nick"
 msgstr "No es pot canviar el sobrenom"
 
@@ -3763,41 +3673,6 @@
 msgid "SASL error"
 msgstr "Error en el SASL"
 
-msgid "The BOSH connection manager terminated your session."
-msgstr ""
-
-#, fuzzy
-msgid "No session ID given"
-msgstr "No s'ha indicat cap motiu"
-
-#, fuzzy
-msgid "Unsupported version of BOSH protocol"
-msgstr "Aquesta versió no està implementada"
-
-#, fuzzy
-msgid "Unable to establish a connection with the server"
-msgstr ""
-"No s'ha pogut establir una connexió amb al servidor:\n"
-"%s"
-
-#, c-format
-msgid ""
-"Could not establish a connection with the server:\n"
-"%s"
-msgstr ""
-"No s'ha pogut establir una connexió amb al servidor:\n"
-"%s"
-
-#, fuzzy
-msgid "Unable to establish SSL connection"
-msgstr "No s'ha pogut inicialitzar la connexió"
-
-msgid "Unable to create socket"
-msgstr "No s'ha pogut crear el sòcol"
-
-msgid "Write error"
-msgstr "Error d'escriptura"
-
 msgid "Full Name"
 msgstr "Nom"
 
@@ -3864,10 +3739,6 @@
 msgid "Operating System"
 msgstr "Sistema operatiu"
 
-#, fuzzy
-msgid "Local Time"
-msgstr "Fitxer local:"
-
 msgid "Last Activity"
 msgstr "Darrera activitat"
 
@@ -4211,6 +4082,9 @@
 msgid "You require encryption, but it is not available on this server."
 msgstr "Requeriu xifratge, però no està disponible en aquest servidor."
 
+msgid "Write error"
+msgstr "Error d'escriptura"
+
 msgid "Ping timeout"
 msgstr "Temps d'espera del ping"
 
@@ -4219,9 +4093,14 @@
 
 #, c-format
 msgid ""
-"Could not find alternative XMPP connection methods after failing to connect "
-"directly.\n"
-msgstr ""
+"Could not establish a connection with the server:\n"
+"%s"
+msgstr ""
+"No s'ha pogut establir una connexió amb al servidor:\n"
+"%s"
+
+msgid "Unable to create socket"
+msgstr "No s'ha pogut crear el sòcol"
 
 msgid "Invalid XMPP ID"
 msgstr "ID de l'XMPP invàlid"
@@ -4229,10 +4108,6 @@
 msgid "Invalid XMPP ID. Domain must be set."
 msgstr "L'ID de l'XMPP no és vàlid. Cal especificar un domini."
 
-#, fuzzy
-msgid "Malformed BOSH Connect Server"
-msgstr "No s'ha pogut connectar al servidor."
-
 #, c-format
 msgid "Registration of %s@%s successful"
 msgstr "S'ha registrat %s a %s amb èxit"
@@ -4323,13 +4198,6 @@
 msgid "Not Authorized"
 msgstr "No autoritzat"
 
-msgid "Mood"
-msgstr "Estat d'ànim"
-
-# FIXME?
-msgid "Now Listening"
-msgstr "Ara escoltant"
-
 msgid "Both"
 msgstr "Ambdós"
 
@@ -4351,6 +4219,13 @@
 msgid "Subscription"
 msgstr "Subscripció"
 
+msgid "Mood"
+msgstr "Estat d'ànim"
+
+# FIXME?
+msgid "Now Listening"
+msgstr "Ara escoltant"
+
 msgid "Mood Text"
 msgstr "Text sobre l'estat d'ànim"
 
@@ -4600,12 +4475,13 @@
 msgstr ""
 "No s'ha pogut botzinar possiblement perquè l'usuari %s està desconnectat."
 
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Unable to buzz, because %s does not support it or does not wish to receive "
 "buzzes now."
 msgstr ""
-"No s'ha pogut botzinar perquè no és pot, o bé l'usuari %s no ho permet."
+"No s'ha pogut botzinar l'usuari %s perquè no ho implementa, o bé ara mateix "
+"no ho permet."
 
 #, c-format
 msgid "Buzzing %s..."
@@ -4620,38 +4496,6 @@
 msgid "%s has buzzed you!"
 msgstr "%s us ha botzinat!"
 
-#, fuzzy, c-format
-msgid "Unable to initiate media with %s: invalid JID"
-msgstr "No s'ha pogut enviar el fitxer a %s, el JID no és vàlid"
-
-#, fuzzy, c-format
-msgid "Unable to initiate media with %s: user is not online"
-msgstr "No s'ha pogut enviar el fitxer a %s, l'usuari no està connectat"
-
-# FIXME: uh?
-#, fuzzy, c-format
-msgid "Unable to initiate media with %s: not subscribed to user presence"
-msgstr ""
-"No s'ha pogut enviar el fitxer a %s, no esteu subscrit a la presència de "
-"l'usuari"
-
-#, fuzzy
-msgid "Media Initiation Failed"
-msgstr "Ha fallat el registre"
-
-#, fuzzy, c-format
-msgid ""
-"Please select the resource of %s with which you would like to start a media "
-"session."
-msgstr "Escolliu a quin recurs de %s voleu enviar un fitxer"
-
-msgid "Select a Resource"
-msgstr "Seleccioneu un recurs"
-
-#, fuzzy
-msgid "Initiate Media"
-msgstr "Inicia un _xat"
-
 msgid "config:  Configure a chat room."
 msgstr "config:  configura la sala de xat."
 
@@ -4846,6 +4690,9 @@
 msgid "Please select the resource of %s to which you would like to send a file"
 msgstr "Escolliu a quin recurs de %s voleu enviar un fitxer"
 
+msgid "Select a Resource"
+msgstr "Seleccioneu un recurs"
+
 msgid "Edit User Mood"
 msgstr "Edita l'estat d'ànim"
 
@@ -5977,7 +5824,7 @@
 
 #, c-format
 msgid "%s has whacked you!"
-msgstr "%s us ha bufetejat [%s]"
+msgstr "%s us ha bufetejat!"
 
 #, c-format
 msgid "Whacking %s..."
@@ -6063,17 +5910,16 @@
 #. We're not entirely sure what the MySpace people mean by
 #. * this... but we think it's the equivalent of "prank."  Or, for
 #. * someone to perform a mischievous trick or practical joke.
-#, fuzzy
 msgid "Punk"
-msgstr "Enredar"
-
-#, fuzzy, c-format
+msgstr "Pren el pèl"
+
+#, c-format
 msgid "%s has punk'd you!"
-msgstr "%s us ha enredat!"
-
-#, fuzzy, c-format
+msgstr "%s us ha près el pèl!"
+
+#, c-format
 msgid "Punking %s..."
-msgstr "S'està enredant %s..."
+msgstr "S'està prenent el pèl a %s..."
 
 #. Raspberry is a slang term for the vibrating sound made
 #. * when you stick your tongue out of your mouth with your
@@ -6082,17 +5928,16 @@
 #. * gesture, so it does not carry a harsh negative
 #. * connotation.  It is generally used in a playful tone
 #. * with friends.
-#, fuzzy
 msgid "Raspberry"
 msgstr "Llengoteja"
 
-#, fuzzy, c-format
+#, c-format
 msgid "%s has raspberried you!"
-msgstr "%s s'ha connectat."
-
-#, fuzzy, c-format
+msgstr "%s us ha fet una llengota!"
+
+#, c-format
 msgid "Raspberrying %s..."
-msgstr "Morrejant"
+msgstr "S'està fent una llengota a %s..."
 
 msgid "Required parameters not passed in"
 msgstr "No s'han passat tots els paràmetres requerits"
@@ -7820,9 +7665,6 @@
 msgid "<p><b>Scrupulous Testers</b>:<br>\n"
 msgstr "<p><b>Comprovadors del codi</b>:<br>\n"
 
-msgid "and more, please let me know... thank you!))"
-msgstr ""
-
 # FIXME: ush... traducció lliure... 
 msgid "<p><i>And, all the boys in the backroom...</i><br>\n"
 msgstr "<p><i>I tothom que ho ha fet possible...<i><br>\n"
@@ -7962,6 +7804,7 @@
 "No s'ha reconegut el codi de resposta en entrar (0x%02X):\n"
 "%s"
 
+#. we didn't successfully connect. tdt->toc_fd is valid here
 msgid "Unable to connect."
 msgstr "No s'ha pogut connectar."
 
@@ -9563,13 +9406,202 @@
 msgstr "Domini Auth"
 
 #, c-format
+msgid "Looking up %s"
+msgstr "S'està cercant %s"
+
+#, c-format
+msgid "Connect to %s failed"
+msgstr "Ha fallat la connexió a %s"
+
+#, c-format
+msgid "Signon: %s"
+msgstr "Entrada: %s"
+
+#, c-format
+msgid "Unable to write file %s."
+msgstr "No s'ha pogut escriure el fitxer %s."
+
+#, c-format
+msgid "Unable to read file %s."
+msgstr "No s'ha pogut llegir el fitxer %s."
+
+#, c-format
+msgid "Message too long, last %s bytes truncated."
+msgstr "El missatge és massa llarg, s'han retallat els darrers %s octets."
+
+#, c-format
+msgid "%s not currently logged in."
+msgstr "%s no està connectat."
+
+#, c-format
+msgid "Warning of %s not allowed."
+msgstr "Avís de %s no permès."
+
+#, c-format
+msgid "A message has been dropped, you are exceeding the server speed limit."
+msgstr ""
+"S'ha ignorat un missatge. Esteu excedint el límit de velocitat del servidor."
+
+#, c-format
+msgid "Chat in %s is not available."
+msgstr "El xat a %s no està disponible."
+
+#, c-format
+msgid "You are sending messages too fast to %s."
+msgstr "Esteu enviant missatges massa de pressa a %s."
+
+#, c-format
+msgid "You missed an IM from %s because it was too big."
+msgstr "Us heu perdut un missatge instantani de %s perquè era massa gran."
+
+#, c-format
+msgid "You missed an IM from %s because it was sent too fast."
+msgstr ""
+"Heu perdut un missatge instantani de %s perquè s'ha enviat massa de pressa."
+
+#, c-format
+msgid "Failure."
+msgstr "Fallada."
+
+#, c-format
+msgid "Too many matches."
+msgstr "Massa coincidències."
+
+#, c-format
+msgid "Need more qualifiers."
+msgstr "Es necessiten més qualificadors."
+
+#, c-format
+msgid "Dir service temporarily unavailable."
+msgstr "Servei de directori no disponible temporalment."
+
+#, c-format
+msgid "Email lookup restricted."
+msgstr "Recerca per adreça de correu electrònic restringida."
+
+#, c-format
+msgid "Keyword ignored."
+msgstr "S'ha ignorat la paraula clau."
+
+#, c-format
+msgid "No keywords."
+msgstr "No hi ha paraules clau."
+
+#, c-format
+msgid "User has no directory information."
+msgstr "L'usuari no té informació al directori."
+
+# FIXME
+#, c-format
+msgid "Country not supported."
+msgstr "Aquest país no està disponible."
+
+#, c-format
+msgid "Failure unknown: %s."
+msgstr "Fallada desconeguda: %s."
+
+#, c-format
+msgid "Incorrect username or password."
+msgstr "El nom d'usuari o la contrasenya no són correctes."
+
+#, c-format
+msgid "The service is temporarily unavailable."
+msgstr "El servei està temporalment no disponible."
+
+#, c-format
+msgid "Your warning level is currently too high to log in."
+msgstr "El vostre nivell d'avisos és massa alt per a connectar-se."
+
+#, c-format
+msgid ""
+"You have been connecting and disconnecting too frequently.  Wait ten minutes "
+"and try again.  If you continue to try, you will need to wait even longer."
+msgstr ""
+"Us heu estat connectant i desconnectant amb massa freqüència. Espereu deu "
+"minuts i torneu-ho a provar. Si continueu intentant-ho, haureu d'esperar "
+"encara més."
+
+#, c-format
+msgid "An unknown signon error has occurred: %s."
+msgstr "Hi ha hagut un error de connexió desconegut: %s."
+
+#, c-format
+msgid "An unknown error, %d, has occurred.  Info: %s"
+msgstr "S'ha produït un error desconegut, %d. Informació: %s"
+
+msgid "Invalid Groupname"
+msgstr "El nom del grup no és vàlid"
+
+msgid "Connection Closed"
+msgstr "Connexió tancada"
+
+msgid "Waiting for reply..."
+msgstr "S'està esperant una resposta..."
+
+msgid "TOC has come back from its pause. You may now send messages again."
+msgstr "TOC ha tornat de la pausa. Ja podeu enviar missatges de nou."
+
+msgid "Password Change Successful"
+msgstr "S'ha canviat la contrasenya amb èxit"
+
+msgid "_Group:"
+msgstr "_Grup:"
+
+msgid "Get Dir Info"
+msgstr "Aconsegueix informació del directori"
+
+msgid "Set Dir Info"
+msgstr "Estableix informació del directori"
+
+#, c-format
+msgid "Could not open %s for writing!"
+msgstr "No s'ha pogut obrir %s per a escriure-hi."
+
+msgid "File transfer failed; other side probably canceled."
+msgstr ""
+"Ha fallat la transferència de fitxers. Probablement s'ha cancel·lat a "
+"l'altra banda."
+
+msgid "Could not connect for transfer."
+msgstr "No s'ha pogut connectar per realitzar la transferència."
+
+msgid "Could not write file header.  The file will not be transferred."
+msgstr "No s'ha pogut escriure la capçalera del fitxer. No s'enviarà."
+
+msgid "Save As..."
+msgstr "Anomena i desa..."
+
+#, c-format
+msgid "%s requests %s to accept %d file: %s (%.2f %s)%s%s"
+msgid_plural "%s requests %s to accept %d files: %s (%.2f %s)%s%s"
+msgstr[0] "%s demana a %s que accepti %d fitxer: %s (%.2f %s)%s%s"
+msgstr[1] "%s demana a %s que accepti %d fitxers: %s (%.2f %s)%s%s"
+
+#, c-format
+msgid "%s requests you to send them a file"
+msgstr "%s us demana que li envieu un fitxer"
+
+#. *< type
+#. *< ui_requirement
+#. *< flags
+#. *< dependencies
+#. *< priority
+#. *< id
+#. *< name
+#. *< version
+#. *  summary
+#. *  description
+msgid "TOC Protocol Plugin"
+msgstr "Connector per al protocol TOC"
+
+#, c-format
 msgid "%s has sent you a webcam invite, which is not yet supported."
 msgstr ""
 "%s us ha enviat una invitació a la seva càmera web, però això encara no està "
 "implementat."
 
 msgid "Your SMS was not delivered"
-msgstr ""
+msgstr "No s'ha enviat l'SMS"
 
 msgid "Your Yahoo! message did not get sent."
 msgstr "No s'ha pogut enviar el vostre missatge de Yahoo!"
@@ -10300,13 +10332,13 @@
 msgid "Unable to connect to %s: %s"
 msgstr "No s'ha pogut connectar a %s: %s"
 
-#, fuzzy, c-format
+#, c-format
 msgid ""
 "Unable to connect to %s: Server requires TLS/SSL, but no TLS/SSL support was "
 "found."
 msgstr ""
-"El servidor requereix TLS/SSL per entrar. No s'ha trobat suport per a TLS/"
-"SSL."
+"No s'ha pogut connectar a %s: el servidor requereix TLS/SSL, però no s'ha "
+"trobat cap implementació de TLS/SSL."
 
 #, c-format
 msgid " - %s"
@@ -10395,8 +10427,10 @@
 msgid "Use this buddy _icon for this account:"
 msgstr "Utilitza aquesta _icona d'amic per a aquest compte:"
 
-msgid "_Advanced"
-msgstr "_Avançat"
+#. Build the protocol options frame.
+#, c-format
+msgid "%s Options"
+msgstr "Opcions de %s"
 
 msgid "Use GNOME Proxy Settings"
 msgstr "Empra la configuració del servidor intermediari del Gnome"
@@ -10431,6 +10465,9 @@
 msgid "you can see the butterflies mating"
 msgstr "podreu veure les papallones aparellant-se"
 
+msgid "Proxy Options"
+msgstr "Opcions del servidor intermediari"
+
 msgid "Proxy _type:"
 msgstr "_Tipus de servidor intermediari"
 
@@ -10458,9 +10495,8 @@
 msgid "Create _this new account on the server"
 msgstr "Crea _aquest compte nou al servidor"
 
-#, fuzzy
-msgid "_Proxy"
-msgstr "Servidor intermediari"
+msgid "_Advanced"
+msgstr "_Avançat"
 
 msgid "Enabled"
 msgstr "Habilitat"
@@ -10539,17 +10575,6 @@
 msgid "I_M"
 msgstr "_MI"
 
-#, fuzzy
-msgid "_Audio Call"
-msgstr "Finalitza la trucada"
-
-msgid "Audio/_Video Call"
-msgstr ""
-
-#, fuzzy
-msgid "_Video Call"
-msgstr "Xat de vídeo"
-
 msgid "_Send File..."
 msgstr "_Envia un fitxer..."
 
@@ -10832,7 +10857,7 @@
 msgstr "Rehabilita"
 
 msgid "SSL FAQs"
-msgstr ""
+msgstr "PMF sobre SSL"
 
 msgid "Welcome back!"
 msgstr "Ben tornat!"
@@ -10922,9 +10947,6 @@
 msgid "A_lias:"
 msgstr "Àl_ies:"
 
-msgid "_Group:"
-msgstr "_Grup:"
-
 msgid "Auto_join when account becomes online."
 msgstr "_Entra automàticament quant el compte estigui connectat."
 
@@ -10975,6 +10997,14 @@
 msgid "Invite Buddy Into Chat Room"
 msgstr "Convida l'amic a una sala de xat"
 
+#. Put our happy label in it.
+msgid ""
+"Please enter the name of the user you wish to invite, along with an optional "
+"invite message."
+msgstr ""
+"Introduïu el nom de l'usuari que vulgueu convidar, així com un missatge "
+"d'invitació opcional."
+
 msgid "_Buddy:"
 msgstr "_Amic:"
 
@@ -11050,22 +11080,6 @@
 msgid "/Conversation/Clea_r Scrollback"
 msgstr "/Conversa/_Neteja la finestra"
 
-#, fuzzy
-msgid "/Conversation/M_edia"
-msgstr "/Conversa/_Més"
-
-#, fuzzy
-msgid "/Conversation/Media/_Audio Call"
-msgstr "/Conversa/_Més"
-
-#, fuzzy
-msgid "/Conversation/Media/_Video Call"
-msgstr "/Conversa/_Més"
-
-#, fuzzy
-msgid "/Conversation/Media/Audio\\/Video _Call"
-msgstr "/Conversa/Visualitza el _registre"
-
 msgid "/Conversation/Se_nd File..."
 msgstr "/Conversa/Envia un _fitxer..."
 
@@ -11138,18 +11152,6 @@
 msgid "/Conversation/View Log"
 msgstr "/Conversa/Visualitza el registre"
 
-#, fuzzy
-msgid "/Conversation/Media/Audio Call"
-msgstr "/Conversa/Més"
-
-#, fuzzy
-msgid "/Conversation/Media/Video Call"
-msgstr "/Conversa/Visualitza el registre"
-
-#, fuzzy
-msgid "/Conversation/Media/Audio\\/Video Call"
-msgstr "/Conversa/Més"
-
 msgid "/Conversation/Send File..."
 msgstr "/Conversa/Envia un fitxer..."
 
@@ -11336,9 +11338,6 @@
 msgid "Ka-Hing Cheung"
 msgstr "Ka-Hing Cheung"
 
-msgid "voice and video"
-msgstr ""
-
 msgid "support"
 msgstr "suport"
 
@@ -11481,9 +11480,8 @@
 msgid "Ubuntu Georgian Translators"
 msgstr "Traductors al georgià de l'Ubuntu"
 
-#, fuzzy
 msgid "Khmer"
-msgstr "Altres"
+msgstr "Khmer"
 
 msgid "Kannada"
 msgstr "Kannada"
@@ -12324,24 +12322,6 @@
 "Ara se sortirà atès que ja hi ha un altre client del libpurple executant-"
 "se.\n"
 
-msgid "/_Media"
-msgstr ""
-
-msgid "/Media/_Hangup"
-msgstr ""
-
-#, fuzzy
-msgid "Calling..."
-msgstr "S'està calculant..."
-
-#, c-format
-msgid "%s wishes to start an audio/video session with you."
-msgstr ""
-
-#, c-format
-msgid "%s wishes to start a video session with you."
-msgstr ""
-
 #, c-format
 msgid "%s has %d new message."
 msgid_plural "%s has %d new messages."
@@ -12376,20 +12356,19 @@
 msgid "<span weight=\"bold\" size=\"larger\">You have mail!</span>"
 msgstr "<span weight=\"bold\" size=\"larger\">Teniu correu electrònic.</span>"
 
-#, fuzzy
 msgid "New Pounces"
-msgstr "Avís nou per a l'amic"
-
+msgstr "Avisos nous"
+
+# FIXME: Cancel·la?
 msgid "Dismiss"
-msgstr ""
-
-#, fuzzy
+msgstr "Rebutja"
+
+# FIXME: pounced -> envestir?
 msgid "<span weight=\"bold\" size=\"larger\">You have pounced!</span>"
-msgstr "<span weight=\"bold\" size=\"larger\">Teniu correu electrònic.</span>"
-
-#, fuzzy
+msgstr "<span weight=\"bold\" size=\"larger\">Us han envestit!</span>"
+
 msgid "No message"
-msgstr "(1 missatge)"
+msgstr "Cap missatge"
 
 msgid "The following plugins will be unloaded."
 msgstr "Es descarregaran els connectors següents."
@@ -12517,47 +12496,47 @@
 msgid "Pounce Target"
 msgstr "Objectiu de l'avís"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Started typing"
-msgstr "Comenci a escriure"
-
-#, fuzzy, c-format
+msgstr "Hagi començat a escriure"
+
+#, c-format
 msgid "Paused while typing"
 msgstr "S'aturi mentre tecleja"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Signed on"
 msgstr "Es connecti"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Returned from being idle"
-msgstr "Tor_na a estar actiu"
-
-#, fuzzy, c-format
+msgstr "Torna a estar actiu"
+
+#, c-format
 msgid "Returned from being away"
 msgstr "Torni a estar present"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Stopped typing"
 msgstr "Pari d'escriure"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Signed off"
 msgstr "Es desconnecti"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Became idle"
 msgstr "Passi a inactiu"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Went away"
 msgstr "En estar absent"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Sent a message"
 msgstr "Envia un missatge"
 
-#, fuzzy, c-format
+#, c-format
 msgid "Unknown.... Please report this!"
 msgstr "Esdeveniment d'avís desconegut, informeu-nos-en."
 
@@ -12700,6 +12679,9 @@
 msgid "Cannot start browser configuration program."
 msgstr "No s'ha pogut iniciar el programa de configuració del navegador."
 
+msgid "ST_UN server:"
+msgstr "Servidor ST_UN:"
+
 msgid "<span style=\"italic\">Example: stunserver.org</span>"
 msgstr "<span style=\"italic\">Exemple: stunserver.org</span>"
 
@@ -12724,10 +12706,6 @@
 msgid "_End port:"
 msgstr "Port _final:"
 
-#. TURN server
-msgid "Relay Server (TURN)"
-msgstr ""
-
 msgid "Proxy Server &amp; Browser"
 msgstr "Servidor intermediari i navegador"
 
@@ -14289,173 +14267,6 @@
 msgid "This plugin is useful for debbuging XMPP servers or clients."
 msgstr "Aquest connector és útil per a depurar servidors i clients XMPP."
 
-#~ msgid "Invite message"
-#~ msgstr "Missatge d'invitació"
-
-#~ msgid ""
-#~ "Please enter the name of the user you wish to invite,\n"
-#~ "along with an optional invite message."
-#~ msgstr ""
-#~ "Introduïu el nom de l'usuari que vulgueu convidar,\n"
-#~ "així com un missatge d'invitació opcional."
-
-#~ msgid "Looking up %s"
-#~ msgstr "S'està cercant %s"
-
-#~ msgid "Connect to %s failed"
-#~ msgstr "Ha fallat la connexió a %s"
-
-#~ msgid "Signon: %s"
-#~ msgstr "Entrada: %s"
-
-#~ msgid "Unable to write file %s."
-#~ msgstr "No s'ha pogut escriure el fitxer %s."
-
-#~ msgid "Unable to read file %s."
-#~ msgstr "No s'ha pogut llegir el fitxer %s."
-
-#~ msgid "Message too long, last %s bytes truncated."
-#~ msgstr "El missatge és massa llarg, s'han retallat els darrers %s octets."
-
-#~ msgid "%s not currently logged in."
-#~ msgstr "%s no està connectat."
-
-#~ msgid "Warning of %s not allowed."
-#~ msgstr "Avís de %s no permès."
-
-#~ msgid ""
-#~ "A message has been dropped, you are exceeding the server speed limit."
-#~ msgstr ""
-#~ "S'ha ignorat un missatge. Esteu excedint el límit de velocitat del "
-#~ "servidor."
-
-#~ msgid "Chat in %s is not available."
-#~ msgstr "El xat a %s no està disponible."
-
-#~ msgid "You are sending messages too fast to %s."
-#~ msgstr "Esteu enviant missatges massa de pressa a %s."
-
-#~ msgid "You missed an IM from %s because it was too big."
-#~ msgstr "Us heu perdut un missatge instantani de %s perquè era massa gran."
-
-#~ msgid "You missed an IM from %s because it was sent too fast."
-#~ msgstr ""
-#~ "Heu perdut un missatge instantani de %s perquè s'ha enviat massa de "
-#~ "pressa."
-
-#~ msgid "Failure."
-#~ msgstr "Fallada."
-
-#~ msgid "Too many matches."
-#~ msgstr "Massa coincidències."
-
-#~ msgid "Need more qualifiers."
-#~ msgstr "Es necessiten més qualificadors."
-
-#~ msgid "Dir service temporarily unavailable."
-#~ msgstr "Servei de directori no disponible temporalment."
-
-#~ msgid "Email lookup restricted."
-#~ msgstr "Recerca per adreça de correu electrònic restringida."
-
-#~ msgid "Keyword ignored."
-#~ msgstr "S'ha ignorat la paraula clau."
-
-#~ msgid "No keywords."
-#~ msgstr "No hi ha paraules clau."
-
-#~ msgid "User has no directory information."
-#~ msgstr "L'usuari no té informació al directori."
-
-# FIXME
-#~ msgid "Country not supported."
-#~ msgstr "Aquest país no està disponible."
-
-#~ msgid "Failure unknown: %s."
-#~ msgstr "Fallada desconeguda: %s."
-
-#~ msgid "Incorrect username or password."
-#~ msgstr "El nom d'usuari o la contrasenya no són correctes."
-
-#~ msgid "The service is temporarily unavailable."
-#~ msgstr "El servei està temporalment no disponible."
-
-#~ msgid "Your warning level is currently too high to log in."
-#~ msgstr "El vostre nivell d'avisos és massa alt per a connectar-se."
-
-#~ msgid ""
-#~ "You have been connecting and disconnecting too frequently.  Wait ten "
-#~ "minutes and try again.  If you continue to try, you will need to wait "
-#~ "even longer."
-#~ msgstr ""
-#~ "Us heu estat connectant i desconnectant amb massa freqüència. Espereu deu "
-#~ "minuts i torneu-ho a provar. Si continueu intentant-ho, haureu d'esperar "
-#~ "encara més."
-
-#~ msgid "An unknown signon error has occurred: %s."
-#~ msgstr "Hi ha hagut un error de connexió desconegut: %s."
-
-#~ msgid "An unknown error, %d, has occurred.  Info: %s"
-#~ msgstr "S'ha produït un error desconegut, %d. Informació: %s"
-
-#~ msgid "Invalid Groupname"
-#~ msgstr "El nom del grup no és vàlid"
-
-#~ msgid "Connection Closed"
-#~ msgstr "Connexió tancada"
-
-#~ msgid "Waiting for reply..."
-#~ msgstr "S'està esperant una resposta..."
-
-#~ msgid "TOC has come back from its pause. You may now send messages again."
-#~ msgstr "TOC ha tornat de la pausa. Ja podeu enviar missatges de nou."
-
-#~ msgid "Password Change Successful"
-#~ msgstr "S'ha canviat la contrasenya amb èxit"
-
-#~ msgid "Get Dir Info"
-#~ msgstr "Aconsegueix informació del directori"
-
-#~ msgid "Set Dir Info"
-#~ msgstr "Estableix informació del directori"
-
-#~ msgid "Could not open %s for writing!"
-#~ msgstr "No s'ha pogut obrir %s per a escriure-hi."
-
-#~ msgid "File transfer failed; other side probably canceled."
-#~ msgstr ""
-#~ "Ha fallat la transferència de fitxers. Probablement s'ha cancel·lat a "
-#~ "l'altra banda."
-
-#~ msgid "Could not connect for transfer."
-#~ msgstr "No s'ha pogut connectar per realitzar la transferència."
-
-#~ msgid "Could not write file header.  The file will not be transferred."
-#~ msgstr "No s'ha pogut escriure la capçalera del fitxer. No s'enviarà."
-
-#~ msgid "Save As..."
-#~ msgstr "Anomena i desa..."
-
-#~ msgid "%s requests %s to accept %d file: %s (%.2f %s)%s%s"
-#~ msgid_plural "%s requests %s to accept %d files: %s (%.2f %s)%s%s"
-#~ msgstr[0] "%s demana a %s que accepti %d fitxer: %s (%.2f %s)%s%s"
-#~ msgstr[1] "%s demana a %s que accepti %d fitxers: %s (%.2f %s)%s%s"
-
-#~ msgid "%s requests you to send them a file"
-#~ msgstr "%s us demana que li envieu un fitxer"
-
-#~ msgid "TOC Protocol Plugin"
-#~ msgstr "Connector per al protocol TOC"
-
-#~ msgid "%s Options"
-#~ msgstr "Opcions de %s"
-
-#~ msgid "Proxy Options"
-#~ msgstr "Opcions del servidor intermediari"
-
-#~ msgid "ST_UN server:"
-#~ msgstr "Servidor ST_UN:"
-
 #~ msgid "By log size"
 #~ msgstr "Per la mida del registre"
 
@@ -15175,6 +14986,9 @@
 #~ "\n"
 #~ "Inactiu: %s"
 
+#~ msgid "Nickname: %s\n"
+#~ msgstr "Sobrenom: %s\n"
+
 #~ msgid ""
 #~ "\n"
 #~ "<b>Nickname:</b> %s"
@@ -15646,6 +15460,9 @@
 #~ msgid "Call ended."
 #~ msgstr "Ha finalitzat la trucada."
 
+#~ msgid "End Call"
+#~ msgstr "Finalitza la trucada"
+
 #~ msgid "Receiving call from %s"
 #~ msgstr "S'està rebent una trucada de %s"