comparison src/module.c @ 2441:2c2c1f717616

[gaim-migrate @ 2454] you can sign people on now. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 06 Oct 2001 02:49:18 +0000
parents 8306c042bac7
children 7f2432a87376
comparison
equal deleted inserted replaced
2440:8306c042bac7 2441:2c2c1f717616
525 } 525 }
526 #endif 526 #endif
527 527
528 void plugin_handler(struct UI *ui, guchar subtype, guchar *data) 528 void plugin_handler(struct UI *ui, guchar subtype, guchar *data)
529 { 529 {
530 guint id;
531 struct gaim_plugin *p;
532
530 switch (subtype) { 533 switch (subtype) {
531 /* 534 /*
532 case CUI_PLUGIN_LIST: 535 case CUI_PLUGIN_LIST:
533 break; 536 break;
534 */ 537 */
535 case CUI_PLUGIN_LOAD: 538 case CUI_PLUGIN_LOAD:
536 load_plugin(data); 539 p = load_plugin(data);
537 /* XXX need to broadcast to UIs that plugin has been loaded */ 540 /* XXX need to broadcast to UIs that plugin has been loaded */
538 break; 541 break;
539 /*
540 case CUI_PLUGIN_UNLOAD: 542 case CUI_PLUGIN_UNLOAD:
543 memcpy(&id, data, sizeof(id));
544 p = g_list_nth_data(plugins, id);
545 if (p) {
546 unload_plugin(p);
547 /* XXX need to broadcast to UIs that plugin has been unloaded */
548 }
541 break; 549 break;
542 case CUI_PLUGIN_RELOAD: 550 case CUI_PLUGIN_RELOAD:
543 break; 551 memcpy(&id, data, sizeof(id));
544 */ 552 p = g_list_nth_data(plugins, id);
553 if (p) {
554 p = reload_plugin(p);
555 /* XXX need to broadcast to UIs that plugin has been reloaded */
556 }
557 break;
545 default: 558 default:
546 debug_printf("unhandled plugin subtype: %d\n", subtype); 559 debug_printf("unhandled plugin subtype %d\n", subtype);
547 break; 560 break;
548 } 561 }
549 } 562 }