Mercurial > pidgin.yaz
comparison src/server.c @ 1038:daad2440a642
[gaim-migrate @ 1048]
i have homework i need to be doing. it's due in less than 7 hours, and i haven't started and i need to sleep.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 31 Oct 2000 10:49:53 +0000 |
parents | 643a4d81c18a |
children | c4baa5509558 |
comparison
equal
deleted
inserted
replaced
1037:1c663beef29d | 1038:daad2440a642 |
---|---|
196 { | 196 { |
197 if (g->prpl && g->prpl->remove_buddy) | 197 if (g->prpl && g->prpl->remove_buddy) |
198 (*g->prpl->remove_buddy)(g, name); | 198 (*g->prpl->remove_buddy)(g, name); |
199 } | 199 } |
200 | 200 |
201 void serv_add_permit(struct gaim_connection *gc, char *name) | 201 void serv_add_permit(struct gaim_connection *g, char *name) |
202 { | 202 { |
203 /* FIXME */ | 203 if (g->prpl && g->prpl->add_permit) |
204 } | 204 (*g->prpl->add_permit)(g, name); |
205 | 205 } |
206 void serv_add_deny(struct gaim_connection *gc, char *name) | 206 |
207 { | 207 void serv_add_deny(struct gaim_connection *g, char *name) |
208 /* FIXME */ | 208 { |
209 } | 209 if (g->prpl && g->prpl->add_deny) |
210 | 210 (*g->prpl->add_deny)(g, name); |
211 void serv_rem_permit(struct gaim_connection *gc, char *name) | 211 } |
212 { | 212 |
213 /* FIXME */ | 213 void serv_rem_permit(struct gaim_connection *g, char *name) |
214 } | 214 { |
215 | 215 if (g->prpl && g->prpl->rem_permit) |
216 void serv_rem_deny(struct gaim_connection *gc, char *name) | 216 (*g->prpl->rem_permit)(g, name); |
217 { | 217 } |
218 /* FIXME */ | 218 |
219 } | 219 void serv_rem_deny(struct gaim_connection *g, char *name) |
220 | 220 { |
221 void serv_set_permit_deny(struct gaim_connection *gc) | 221 if (g->prpl && g->prpl->rem_deny) |
222 { | 222 (*g->prpl->rem_deny)(g, name); |
223 /* FIXME */ | 223 } |
224 | |
225 void serv_set_permit_deny(struct gaim_connection *g) | |
226 { | |
224 /* this is called when some other function has modified the permit/deny list and | 227 /* this is called when some other function has modified the permit/deny list and |
225 * now wants to register that change with the server. if you're just adding/removing | 228 * now wants to register that change with the server. if you're just adding/removing |
226 * one name, use the add/remove functions above */ | 229 * one name, use the add/remove functions above */ |
230 if (g->prpl && g->prpl->set_permit_deny) | |
231 (*g->prpl->set_permit_deny)(g); | |
227 } | 232 } |
228 | 233 |
229 | 234 |
230 void serv_set_idle(struct gaim_connection *g, int time) | 235 void serv_set_idle(struct gaim_connection *g, int time) |
231 { | 236 { |
403 if (!b) { | 408 if (!b) { |
404 sprintf(debug_buff,"Error, no such person\n"); | 409 sprintf(debug_buff,"Error, no such person\n"); |
405 debug_print(debug_buff); | 410 debug_print(debug_buff); |
406 return; | 411 return; |
407 } | 412 } |
408 | |
409 debug_printf("got update for %s\n", b->name); | |
410 | 413 |
411 /* This code will 'align' the name from the TOC */ | 414 /* This code will 'align' the name from the TOC */ |
412 /* server with what's in our record. We want to */ | 415 /* server with what's in our record. We want to */ |
413 /* store things how THEY want it... */ | 416 /* store things how THEY want it... */ |
414 if (strcmp(name, b->name)) { | 417 if (strcmp(name, b->name)) { |
440 | 443 |
441 /* okay lets save the new config... */ | 444 /* okay lets save the new config... */ |
442 | 445 |
443 } | 446 } |
444 | 447 |
445 if (!b->idle && idle) plugin_event(event_buddy_idle, b->name, 0, 0, 0); | 448 if (!b->idle && idle) plugin_event(event_buddy_idle, gc, b->name, 0, 0); |
446 if (b->idle && !idle) plugin_event(event_buddy_unidle, b->name, 0, 0, 0); | 449 if (b->idle && !idle) plugin_event(event_buddy_unidle, gc, b->name, 0, 0); |
447 | 450 |
448 b->idle = idle; | 451 b->idle = idle; |
449 b->evil = evil; | 452 b->evil = evil; |
450 | 453 |
451 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { | 454 if ((b->uc & UC_UNAVAILABLE) && !(type & UC_UNAVAILABLE)) { |
452 plugin_event(event_buddy_back, b->name, 0, 0, 0); | 455 plugin_event(event_buddy_back, gc, b->name, 0, 0); |
453 } else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) { | 456 } else if (!(b->uc & UC_UNAVAILABLE) && (type & UC_UNAVAILABLE)) { |
454 plugin_event(event_buddy_away, b->name, 0, 0, 0); | 457 plugin_event(event_buddy_away, gc, b->name, 0, 0); |
455 } | 458 } |
456 | 459 |
457 b->uc = type; | 460 b->uc = type; |
458 if (caps) b->caps = caps; | 461 if (caps) b->caps = caps; |
459 | 462 |
461 | 464 |
462 if (loggedin) { | 465 if (loggedin) { |
463 if (!b->present) { | 466 if (!b->present) { |
464 b->present = 1; | 467 b->present = 1; |
465 do_pounce(b->name); | 468 do_pounce(b->name); |
466 plugin_event(event_buddy_signon, b->name, 0, 0, 0); | 469 plugin_event(event_buddy_signon, gc, b->name, 0, 0); |
467 } | 470 } |
468 } else { | 471 } else { |
469 if (b->present) | 472 if (b->present) |
470 plugin_event(event_buddy_signoff, b->name, 0, 0, 0); | 473 plugin_event(event_buddy_signoff, gc, b->name, 0, 0); |
471 b->present = 0; | 474 b->present = 0; |
472 } | 475 } |
473 | 476 |
474 set_buddy(gc, b); | 477 set_buddy(gc, b); |
475 } | 478 } |