Mercurial > pidgin
comparison src/protocols/irc/parse.c @ 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 | d54f14237255 |
| children | cbdce0acbbe6 |
comparison
equal
deleted
inserted
replaced
| 10153:0b43f6fef9b5 | 10154:6ccd92a58cde |
|---|---|
| 492 msg = irc_format(irc, "vv", "PONG", input + 5); | 492 msg = irc_format(irc, "vv", "PONG", input + 5); |
| 493 irc_send(irc, msg); | 493 irc_send(irc, msg); |
| 494 g_free(msg); | 494 g_free(msg); |
| 495 return; | 495 return; |
| 496 } else if (!strncmp(input, "ERROR ", 6)) { | 496 } else if (!strncmp(input, "ERROR ", 6)) { |
| 497 gaim_connection_error(gaim_account_get_connection(irc->account), _("Disconnected.")); | 497 if (g_utf8_validate(input, -1, NULL)) { |
| 498 char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input); | |
| 499 gaim_connection_error(gaim_account_get_connection(irc->account), tmp); | |
| 500 g_free(tmp); | |
| 501 } else | |
| 502 gaim_connection_error(gaim_account_get_connection(irc->account), _("Disconnected.")); | |
| 498 return; | 503 return; |
| 499 } | 504 } |
| 500 | 505 |
| 501 if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) { | 506 if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) { |
| 502 irc_parse_error_cb(irc, input); | 507 irc_parse_error_cb(irc, input); |
