Mercurial > pidgin
comparison src/conversation.c @ 6414:874a5c9f4eb8
[gaim-migrate @ 6921]
Added gaim_chat_clear_users().
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 08 Aug 2003 19:48:50 +0000 |
parents | ba0b99a72be2 |
children | 9c65a439d327 |
comparison
equal
deleted
inserted
replaced
6413:6b0a8796e9ae | 6414:874a5c9f4eb8 |
---|---|
2117 WFLAG_SYSTEM, time(NULL)); | 2117 WFLAG_SYSTEM, time(NULL)); |
2118 } | 2118 } |
2119 } | 2119 } |
2120 } | 2120 } |
2121 | 2121 |
2122 void | |
2123 gaim_chat_clear_users(GaimChat *chat) | |
2124 { | |
2125 GaimConversation *conv; | |
2126 GaimConversationUiOps *ops; | |
2127 GList *users; | |
2128 GList *l, *l_next; | |
2129 | |
2130 g_return_if_fail(chat != NULL); | |
2131 | |
2132 conv = gaim_chat_get_conversation(chat); | |
2133 ops = gaim_conversation_get_ui_ops(conv); | |
2134 users = gaim_chat_get_users(chat); | |
2135 | |
2136 if (ops != NULL && ops->chat_remove_users != NULL) | |
2137 ops->chat_remove_users(conv, users); | |
2138 | |
2139 for (l = users; l != NULL; l = l_next) | |
2140 { | |
2141 char *user = (char *)l->data; | |
2142 | |
2143 l_next = l->next; | |
2144 | |
2145 gaim_event_broadcast(event_chat_buddy_leave, | |
2146 gaim_conversation_get_gc(conv), | |
2147 gaim_chat_get_id(chat), user); | |
2148 | |
2149 g_free(user); | |
2150 } | |
2151 | |
2152 g_list_free(users); | |
2153 gaim_chat_set_users(chat, NULL); | |
2154 } | |
2155 | |
2122 GaimConversation * | 2156 GaimConversation * |
2123 gaim_find_chat(const GaimConnection *gc, int id) | 2157 gaim_find_chat(const GaimConnection *gc, int id) |
2124 { | 2158 { |
2125 GList *l; | 2159 GList *l; |
2126 GaimConversation *conv; | 2160 GaimConversation *conv; |