# HG changeset patch # User Ethan Blanton # Date 1086040521 0 # Node ID dcb290a0c970fd7e02eb1cde73743e8fb897caf7 # Parent 5ad89e84b3d38f675032b9ebf9427793fbe99c09 [gaim-migrate @ 9938] Thanks to Stu Tomlinson, we can now change the IRC topic by way of the input box at the top of each chat. committer: Tailor Script diff -r 5ad89e84b3d3 -r dcb290a0c970 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Mon May 31 07:31:20 2004 +0000 +++ b/src/protocols/irc/irc.c Mon May 31 21:55:21 2004 +0000 @@ -500,6 +500,23 @@ g_free(ib); } +static void irc_chat_set_topic(GaimConnection *gc, int id, const char *topic) +{ + char *buf; + const char *name = NULL; + struct irc_conn *irc; + + irc = gc->proto_data; + name = gaim_conversation_get_name(gaim_find_chat(gc, id)); + + if (name == NULL) + return; + + buf = irc_format(irc, "vt:", "TOPIC", name, topic); + irc_send(irc, buf); + g_free(buf); +} + static GaimRoomlist *irc_roomlist_get_list(GaimConnection *gc) { struct irc_conn *irc; @@ -601,7 +618,7 @@ NULL, /* set buddy icon */ NULL, /* remove group */ NULL, /* get_cb_real_name */ - NULL, + irc_chat_set_topic, NULL, irc_roomlist_get_list, irc_roomlist_cancel,