Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 8114:7a6e30eb7aad
[gaim-migrate @ 8818]
Thanks to Tim Ringenbach for this IRC chat list.
committer: Tailor Script <tailor@pidgin.im>
| author | Ethan Blanton <elb@pidgin.im> |
|---|---|
| date | Thu, 15 Jan 2004 22:53:07 +0000 |
| parents | de9a93878469 |
| children | a0e7d0995156 |
comparison
equal
deleted
inserted
replaced
| 8113:d60272410bd5 | 8114:7a6e30eb7aad |
|---|---|
| 463 { | 463 { |
| 464 g_free(ib->name); | 464 g_free(ib->name); |
| 465 g_free(ib); | 465 g_free(ib); |
| 466 } | 466 } |
| 467 | 467 |
| 468 static GaimRoomlist *irc_roomlist_get_list(GaimConnection *gc) | |
| 469 { | |
| 470 struct irc_conn *irc; | |
| 471 GList *fields = NULL; | |
| 472 GaimRoomlistField *f; | |
| 473 | |
| 474 irc = gc->proto_data; | |
| 475 | |
| 476 if (irc->roomlist) | |
| 477 gaim_roomlist_unref(irc->roomlist); | |
| 478 | |
| 479 irc->roomlist = gaim_roomlist_new(gaim_connection_get_account(gc)); | |
| 480 | |
| 481 f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, "", "channel", TRUE); | |
| 482 fields = g_list_append(fields, f); | |
| 483 | |
| 484 f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_INT, _("Users"), "users", FALSE); | |
| 485 fields = g_list_append(fields, f); | |
| 486 | |
| 487 f = gaim_roomlist_field_new(GAIM_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE); | |
| 488 fields = g_list_append(fields, f); | |
| 489 | |
| 490 gaim_roomlist_set_fields(irc->roomlist, fields); | |
| 491 | |
| 492 irc_cmd_list(irc, "LIST", NULL, NULL); | |
| 493 | |
| 494 return irc->roomlist; | |
| 495 } | |
| 496 | |
| 497 static void irc_roomlist_cancel(GaimRoomlist *list) | |
| 498 { | |
| 499 GaimConnection *gc = gaim_account_get_connection(list->account); | |
| 500 struct irc_conn *irc; | |
| 501 | |
| 502 if (gc == NULL) | |
| 503 return; | |
| 504 | |
| 505 irc = gc->proto_data; | |
| 506 | |
| 507 gaim_roomlist_set_in_progress(list, FALSE); | |
| 508 | |
| 509 if (irc->roomlist == list) { | |
| 510 irc->roomlist = NULL; | |
| 511 gaim_roomlist_unref(list); | |
| 512 } | |
| 513 } | |
| 514 | |
| 468 static GaimPluginProtocolInfo prpl_info = | 515 static GaimPluginProtocolInfo prpl_info = |
| 469 { | 516 { |
| 470 OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL, | 517 OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL, |
| 471 NULL, | 518 NULL, |
| 472 NULL, | 519 NULL, |
| 513 NULL, | 560 NULL, |
| 514 NULL, | 561 NULL, |
| 515 NULL, | 562 NULL, |
| 516 NULL, | 563 NULL, |
| 517 NULL, /*irc_convo_closed,*/ | 564 NULL, /*irc_convo_closed,*/ |
| 565 NULL, /* normalize */ | |
| 566 NULL, /* set buddy icon */ | |
| 567 NULL, /* remove group */ | |
| 568 NULL, /* get_cb_real_name */ | |
| 569 NULL, | |
| 570 NULL, | |
| 571 irc_roomlist_get_list, | |
| 572 irc_roomlist_cancel, | |
| 518 NULL | 573 NULL |
| 519 }; | 574 }; |
| 575 | |
| 520 | 576 |
| 521 static GaimPluginInfo info = | 577 static GaimPluginInfo info = |
| 522 { | 578 { |
| 523 2, /**< api_version */ | 579 2, /**< api_version */ |
| 524 GAIM_PLUGIN_PROTOCOL, /**< type */ | 580 GAIM_PLUGIN_PROTOCOL, /**< type */ |
