Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/google.c @ 15467:2c81b0a81790
Make deleting Google Talk buddies work
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Tue, 30 Jan 2007 21:04:04 +0000 |
parents | 5fe8042783c1 |
children | ccbdf500f13a |
comparison
equal
deleted
inserted
replaced
15466:cc1721b06dc6 | 15467:2c81b0a81790 |
---|---|
204 list = list->next; | 204 list = list->next; |
205 } | 205 } |
206 | 206 |
207 } | 207 } |
208 | 208 |
209 void jabber_google_roster_incoming(JabberStream *js, xmlnode *item) | 209 gboolean jabber_google_roster_incoming(JabberStream *js, xmlnode *item) |
210 { | 210 { |
211 GaimAccount *account = gaim_connection_get_account(js->gc); | 211 GaimAccount *account = gaim_connection_get_account(js->gc); |
212 GSList *list = account->deny; | 212 GSList *list = account->deny; |
213 const char *jid = xmlnode_get_attrib(item, "jid"); | 213 const char *jid = xmlnode_get_attrib(item, "jid"); |
214 gboolean on_block_list = FALSE; | 214 gboolean on_block_list = FALSE; |
221 if (!strcmp(jid_norm, (char*)list->data)) { | 221 if (!strcmp(jid_norm, (char*)list->data)) { |
222 on_block_list = TRUE; | 222 on_block_list = TRUE; |
223 break; | 223 break; |
224 } | 224 } |
225 list = list->next; | 225 list = list->next; |
226 } | |
227 | |
228 if (grt && (*grt == 'H' || *grt == 'h')) { | |
229 GaimBuddy *buddy = gaim_find_buddy(account, jid_norm); | |
230 gaim_blist_remove_buddy(buddy); | |
231 return FALSE; | |
226 } | 232 } |
227 | 233 |
228 if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) { | 234 if (!on_block_list && (grt && (*grt == 'B' || *grt == 'b'))) { |
229 gaim_debug_info("jabber", "Blocking %s\n", jid_norm); | 235 gaim_debug_info("jabber", "Blocking %s\n", jid_norm); |
230 gaim_privacy_deny_add(account, jid_norm, TRUE); | 236 gaim_privacy_deny_add(account, jid_norm, TRUE); |
231 } else if (on_block_list && (!grt || (*grt != 'B' && *grt != 'b' ))){ | 237 } else if (on_block_list && (!grt || (*grt != 'B' && *grt != 'b' ))){ |
232 gaim_debug_info("jabber", "Unblocking %s\n", jid_norm); | 238 gaim_debug_info("jabber", "Unblocking %s\n", jid_norm); |
233 gaim_privacy_deny_remove(account, jid_norm, TRUE); | 239 gaim_privacy_deny_remove(account, jid_norm, TRUE); |
234 } | 240 } |
241 return TRUE; | |
235 } | 242 } |
236 | 243 |
237 void jabber_google_roster_add_deny(GaimConnection *gc, const char *who) | 244 void jabber_google_roster_add_deny(GaimConnection *gc, const char *who) |
238 { | 245 { |
239 JabberStream *js; | 246 JabberStream *js; |