Mercurial > pidgin.yaz
diff libpurple/protocols/irc/irc.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | 0f94ec89f0bc a78523019e7a |
children |
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c Mon Sep 26 14:57:21 2011 +0900 +++ b/libpurple/protocols/irc/irc.c Sat Nov 19 14:42:54 2011 +0900 @@ -356,7 +356,7 @@ const char *username = purple_account_get_username(account); gc = purple_account_get_connection(account); - gc->flags |= PURPLE_CONNECTION_NO_NEWLINES; + purple_connection_set_flags(gc, PURPLE_CONNECTION_NO_NEWLINES); if (strpbrk(username, " \t\v\r\n") != NULL) { purple_connection_error (gc, @@ -500,7 +500,7 @@ irc->fd = source; if (do_login(gc)) { - gc->inpa = purple_input_add(irc->fd, PURPLE_INPUT_READ, irc_input_cb, gc); + irc->inpa = purple_input_add(irc->fd, PURPLE_INPUT_READ, irc_input_cb, gc); } } @@ -526,8 +526,10 @@ if (irc->gsc || (irc->fd >= 0)) irc_cmd_quit(irc, "quit", NULL, NULL); - if (gc->inpa) - purple_input_remove(gc->inpa); + if (irc->inpa) { + purple_input_remove(irc->inpa); + irc->inpa = 0; + } g_free(irc->inbuf); if (irc->gsc) { @@ -645,9 +647,10 @@ static void read_input(struct irc_conn *irc, int len) { + PurpleConnection *connection = purple_account_get_connection(irc->account); char *cur, *end; - irc->account->gc->last_received = time(NULL); + purple_connection_update_last_received(connection); irc->inbufused += len; irc->inbuf[irc->inbufused] = '\0'; @@ -807,7 +810,7 @@ } #endif purple_markup_html_to_xhtml(what, NULL, &tmp); - args[0] = convo->name; + args[0] = purple_conversation_get_name(convo); args[1] = tmp; irc_cmd_privmsg(irc, "msg", NULL, args);