changeset 10154:6ccd92a58cde

[gaim-migrate @ 11233] I committed this to oldstatus earlier. It displays ERROR strings better, but someone should probably patch it to be more better. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Thu, 04 Nov 2004 04:05:43 +0000
parents 0b43f6fef9b5
children e05a325ac5a6
files src/protocols/irc/parse.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/parse.c	Thu Nov 04 03:39:30 2004 +0000
+++ b/src/protocols/irc/parse.c	Thu Nov 04 04:05:43 2004 +0000
@@ -494,7 +494,12 @@
 		g_free(msg);
 		return;
 	} else if (!strncmp(input, "ERROR ", 6)) {
-		gaim_connection_error(gaim_account_get_connection(irc->account), _("Disconnected."));
+		if (g_utf8_validate(input, -1, NULL)) {
+			char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input);
+			gaim_connection_error(gaim_account_get_connection(irc->account), tmp);
+			g_free(tmp);
+		} else
+			gaim_connection_error(gaim_account_get_connection(irc->account), _("Disconnected."));
 		return;
 	}