libpurple/protocols/irc/parse.c

branch
cpw.resiak.disconnectreason
changeset 20855
d263076a39f8
parent 20440
42e5e5445a2f
child 21148
b229c8c97306
equal deleted inserted replaced
20854:c844b5545119 20855:d263076a39f8
574 g_free(msg); 574 g_free(msg);
575 return; 575 return;
576 } else if (!strncmp(input, "ERROR ", 6)) { 576 } else if (!strncmp(input, "ERROR ", 6)) {
577 if (g_utf8_validate(input, -1, NULL)) { 577 if (g_utf8_validate(input, -1, NULL)) {
578 char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input); 578 char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input);
579 purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR, tmp); 579 purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, tmp);
580 g_free(tmp); 580 g_free(tmp);
581 } else 581 } else
582 purple_connection_error_reason (gc, 582 purple_connection_error_reason (gc,
583 PURPLE_REASON_OTHER_ERROR, _("Disconnected.")); 583 PURPLE_REASON_NETWORK_ERROR, _("Disconnected."));
584 return; 584 return;
585 } 585 }
586 586
587 if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) { 587 if (input[0] != ':' || (cur = strchr(input, ' ')) == NULL) {
588 irc_parse_error_cb(irc, input); 588 irc_parse_error_cb(irc, input);

mercurial