changeset 2652:65a602693286

[gaim-migrate @ 2665] eh committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 01 Nov 2001 08:05:38 +0000
parents f84dcbcfba4b
children 06395b1046b1
files src/protocols/irc/irc.c
diffstat 1 files changed, 8 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Thu Nov 01 07:54:48 2001 +0000
+++ b/src/protocols/irc/irc.c	Thu Nov 01 08:05:38 2001 +0000
@@ -634,20 +634,14 @@
 		handle_whois(gc, word, word_eol, n);
 		break;
 	case 318:
-		/*
-		id->whois_str = g_string_append(id->whois_str, "<BR><BR>");
-		id->whois_str = g_string_append(id->whois_str, word_eol[4]);
-		*/
-
-		{
+		if (id->in_whois && id->whois_str) {
 			GString *str = decode_html(id->whois_str->str);
 			g_show_info_text(str->str, NULL);
 			g_string_free(str, TRUE);
+			g_string_free(id->whois_str, TRUE);
+			id->whois_str = NULL;
+			id->in_whois = FALSE;
 		}
-
-		g_string_free(id->whois_str, TRUE);
-		id->whois_str = NULL;
-		id->in_whois = FALSE;
 		break;
 	case 324:
 		handle_mode(gc, word, word_eol, TRUE);
@@ -662,16 +656,12 @@
 		irc_request_buddy_update(gc);
 		break;
 	case 401:
+		do_error_dialog(_("No such nick/channel"), _("IRC Error"));
+		break;
 	case 402:
+		do_error_dialog(_("No such server"), _("IRC Error"));
 	case 431:
-		if (!id->in_whois) {
-			id->in_whois = TRUE;
-			id->whois_str = g_string_new("");
-		} else {
-			id->whois_str = g_string_append(id->whois_str, "<BR><BR>");
-			id->in_whois = TRUE;
-		}
-		id->whois_str = g_string_append(id->whois_str, word_eol[4]);
+		do_error_dialog(_("No nickname given"), _("IRC Error"));
 		break;
 	}
 }