Mercurial > pidgin.yaz
diff libpurple/protocols/irc/parse.c @ 20112:1b420901ca3b
Move prpl-irc to purple_connection_error_reason.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 18 Sep 2007 21:56:56 +0000 |
parents | 44b4e8bd759b |
children | 8174f6999308 |
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c Tue Sep 18 21:37:36 2007 +0000 +++ b/libpurple/protocols/irc/parse.c Tue Sep 18 21:56:56 2007 +0000 @@ -557,6 +557,7 @@ struct _irc_msg *msgent; char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg; guint i; + PurpleConnection *gc = purple_account_get_connection(irc->account); irc->recv_time = time(NULL); @@ -565,7 +566,7 @@ * TODO: It should be passed as an array of bytes and a length * instead of a null terminated string. */ - purple_signal_emit(_irc_plugin, "irc-receiving-text", purple_account_get_connection(irc->account), &input); + purple_signal_emit(_irc_plugin, "irc-receiving-text", gc, &input); if (!strncmp(input, "PING ", 5)) { msg = irc_format(irc, "vv", "PONG", input + 5); @@ -575,10 +576,11 @@ } else if (!strncmp(input, "ERROR ", 6)) { if (g_utf8_validate(input, -1, NULL)) { char *tmp = g_strdup_printf("%s\n%s", _("Disconnected."), input); - purple_connection_error(purple_account_get_connection(irc->account), tmp); + purple_connection_error_reason (gc, PURPLE_REASON_OTHER_ERROR, tmp); g_free(tmp); } else - purple_connection_error(purple_account_get_connection(irc->account), _("Disconnected.")); + purple_connection_error_reason (gc, + PURPLE_REASON_OTHER_ERROR, _("Disconnected.")); return; }