comparison src/protocols/irc/irc.c @ 9154:dcb290a0c970

[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 <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Mon, 31 May 2004 21:55:21 +0000
parents 933a19e3a6b3
children f4f210e47b60
comparison
equal deleted inserted replaced
9153:5ad89e84b3d3 9154:dcb290a0c970
498 { 498 {
499 g_free(ib->name); 499 g_free(ib->name);
500 g_free(ib); 500 g_free(ib);
501 } 501 }
502 502
503 static void irc_chat_set_topic(GaimConnection *gc, int id, const char *topic)
504 {
505 char *buf;
506 const char *name = NULL;
507 struct irc_conn *irc;
508
509 irc = gc->proto_data;
510 name = gaim_conversation_get_name(gaim_find_chat(gc, id));
511
512 if (name == NULL)
513 return;
514
515 buf = irc_format(irc, "vt:", "TOPIC", name, topic);
516 irc_send(irc, buf);
517 g_free(buf);
518 }
519
503 static GaimRoomlist *irc_roomlist_get_list(GaimConnection *gc) 520 static GaimRoomlist *irc_roomlist_get_list(GaimConnection *gc)
504 { 521 {
505 struct irc_conn *irc; 522 struct irc_conn *irc;
506 GList *fields = NULL; 523 GList *fields = NULL;
507 GaimRoomlistField *f; 524 GaimRoomlistField *f;
599 NULL, /*irc_convo_closed,*/ 616 NULL, /*irc_convo_closed,*/
600 NULL, /* normalize */ 617 NULL, /* normalize */
601 NULL, /* set buddy icon */ 618 NULL, /* set buddy icon */
602 NULL, /* remove group */ 619 NULL, /* remove group */
603 NULL, /* get_cb_real_name */ 620 NULL, /* get_cb_real_name */
604 NULL, 621 irc_chat_set_topic,
605 NULL, 622 NULL,
606 irc_roomlist_get_list, 623 irc_roomlist_get_list,
607 irc_roomlist_cancel, 624 irc_roomlist_cancel,
608 NULL 625 NULL
609 }; 626 };