comparison src/plugins.c @ 783:5bad8e4d1c88

[gaim-migrate @ 793] lalala committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 29 Aug 2000 05:08:38 +0000
parents c714def9cebb
children 4c292b3f74ea
comparison
equal deleted inserted replaced
782:faa7faf60607 783:5bad8e4d1c88
530 } 530 }
531 531
532 #endif /* GAIM_PLUGINS */ 532 #endif /* GAIM_PLUGINS */
533 533
534 void plugin_event(enum gaim_event event, void *arg1, void *arg2, void *arg3) { 534 void plugin_event(enum gaim_event event, void *arg1, void *arg2, void *arg3) {
535 #ifdef USE_PERL
536 char buf[BUF_LONG];
537 #endif
535 #ifdef GAIM_PLUGINS 538 #ifdef GAIM_PLUGINS
536 GList *c = callbacks; 539 GList *c = callbacks;
537 struct gaim_callback *g; 540 struct gaim_callback *g;
538 541
539 sprintf(debug_buff, "callback %d\n", event); 542 sprintf(debug_buff, "callback %d\n", event);
565 } 568 }
566 break; 569 break;
567 570
568 /* char *, char ** */ 571 /* char *, char ** */
569 case event_im_send: 572 case event_im_send:
573 case event_chat_send:
570 { 574 {
571 void (*function)(char *, char **, void *) = g->function; 575 void (*function)(char *, char **, void *) = g->function;
572 (*function)(arg1, arg2, g->data); 576 (*function)(arg1, arg2, g->data);
573 } 577 }
574 break; 578 break;
587 break; 591 break;
588 592
589 /* char *, char *, char * */ 593 /* char *, char *, char * */
590 case event_chat_invited: 594 case event_chat_invited:
591 case event_chat_recv: 595 case event_chat_recv:
592 case event_chat_send:
593 { 596 {
594 void (*function)(char *, char *, char *, void *) = g->function; 597 void (*function)(char *, char *, char *, void *) = g->function;
595 (*function)(arg1, arg2, arg3, g->data); 598 (*function)(arg1, arg2, arg3, g->data);
596 } 599 }
597 break; 600 break;
629 } 632 }
630 c = c->next; 633 c = c->next;
631 } 634 }
632 #endif /* GAIM_PLUGINS */ 635 #endif /* GAIM_PLUGINS */
633 #ifdef USE_PERL 636 #ifdef USE_PERL
634 /* FIXME : AIM::event_handler */ 637 switch (event) {
638 case event_signon:
639 buf[0] = 0;
640 break;
641 case event_signoff:
642 buf[0] = 0;
643 break;
644 case event_away:
645 buf[0] = 0;
646 break;
647 case event_back:
648 buf[0] = 0;
649 break;
650 case event_im_recv:
651 sprintf(buf, "%s %s", *(char **)arg1, *(char **)arg2);
652 break;
653 case event_im_send:
654 sprintf(buf, "%s %s", (char *)arg1, *(char **)arg2);
655 break;
656 case event_buddy_signon:
657 sprintf(buf, "%s", (char *)arg1);
658 break;
659 case event_buddy_signoff:
660 sprint:
661 break;
662 case event_buddy_away:
663 sprintf(buf, "%s", (char *)arg1);
664 break;
665 case event_buddy_back:
666 sprintf(buf, "%s", (char *)arg1);
667 break;
668 case event_blist_update:
669 buf[0] = 0;
670 break;
671 case event_chat_invited:
672 sprintf(buf, "%s %s %s", (char *)arg1, (char *)arg2, (char *)arg3);
673 break;
674 case event_chat_join:
675 sprintf(buf, "%s", (char *)arg1);
676 break;
677 case event_chat_leave:
678 sprintf(buf, "%s", (char *)arg1);
679 break;
680 case event_chat_buddy_join:
681 sprintf(buf, "%s %s", (char *)arg1, (char *)arg2);
682 break;
683 case event_chat_buddy_leave:
684 sprintf(buf, "%s %s", (char *)arg1, (char *)arg2);
685 break;
686 case event_chat_recv:
687 sprintf(buf, "%s %s %s", (char *)arg1, (char *)arg2, (char *)arg3);
688 break;
689 case event_chat_send:
690 sprintf(buf, "%s %s", (char *)arg1, *(char **)arg2);
691 break;
692 case event_warned:
693 sprintf(buf, "%s %d", (char *)arg1, (int)arg2);
694 break;
695 case event_error:
696 sprintf(buf, "%d", (int)arg1);
697 break;
698 case event_quit:
699 buf[0] = 0;
700 break;
701 default:
702 break;
703 }
704 sprintf(debug_buff, "perl event %d: %s\n", event, buf);
705 debug_print(debug_buff);
706 perl_event(event, buf);
635 #endif 707 #endif
636 } 708 }