changeset 12998:a2096c8978b2

[gaim-migrate @ 15351] Bleeter updated yahoo chatroom joining to show better errors committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 23 Jan 2006 01:27:40 +0000
parents b4d2a8edba4a
children 68db2c40efb2
files src/protocols/yahoo/yahoochat.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoochat.c	Sun Jan 22 22:58:12 2006 +0000
+++ b/src/protocols/yahoo/yahoochat.c	Mon Jan 23 01:27:40 2006 +0000
@@ -355,7 +355,23 @@
 	char *someid, *someotherid, *somebase64orhashosomething, *somenegativenumber;
 
 	if (pkt->status == -1) {
-		gaim_notify_error(gc, NULL, _("Failed to join chat"), _("Maybe the room is full?"));
+		/* We can't join */
+		struct yahoo_pair *pair = pkt->hash->data;
+		gchar const *failed_to_join = _("Failed to join chat");
+		switch (atoi(pair->value)) {
+			case 0xFFFFFFFA: /* -6 */
+				gaim_notify_error(gc, NULL, failed_to_join, _("Unknown room"));
+				break;
+			case 0xFFFFFFF1: /* -15 */
+				gaim_notify_error(gc, NULL, failed_to_join, _("Maybe the room is full"));
+				break;
+			case 0xFFFFFFDD: /* -35 */
+				gaim_notify_error(gc, NULL, failed_to_join, _("Not available"));
+				break;
+			default:
+				gaim_notify_error(gc, NULL, failed_to_join,
+						_("Unknown error. You may need to logout and wait five minutes before being able to rejoin a chatroom"));
+		}
 		return;
 	}