Mercurial > pidgin
diff src/plugins.c @ 780:c714def9cebb
[gaim-migrate @ 790]
You may be a geek if...
You've ever used a computer on Friday, Saturday and Sunday of the
same weekend.
You find yourself interrupting computer store salesman to correct
something he said.
The first thing you notice when walking in a business is their
computer system. ...and offer advice on how you would change it.
You've ever mounted a magnetic tape reel.
You own any shareware.
You know more IP addresses than phone numbers.
You've ever accidentally dialed an IP address.
Your friends use you as tech support.
You've ever named a computer.
You have your local computer store on speed dial.
You can't carry on a conversation without talking about computers.
Co-workers have to E-mail you about the fire alarm to get you out of
the building.
You've ever found "stray" diskettes when doing laundry.
Your computer has it's own phone line - but your teenager doesn't.
You check the national weather service web page for current weather
conditions (rather than look out the window).
You know more URLs than street addresses.
Your pet has a web page.
You get really excited when Yahoo adds your link.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 29 Aug 2000 03:59:01 +0000 |
| parents | 732ee4f6f541 |
| children | 5bad8e4d1c88 |
line wrap: on
line diff
--- a/src/plugins.c Tue Aug 29 02:57:48 2000 +0000 +++ b/src/plugins.c Tue Aug 29 03:59:01 2000 +0000 @@ -530,3 +530,107 @@ } #endif /* GAIM_PLUGINS */ + +void plugin_event(enum gaim_event event, void *arg1, void *arg2, void *arg3) { +#ifdef GAIM_PLUGINS + GList *c = callbacks; + struct gaim_callback *g; + + sprintf(debug_buff, "callback %d\n", event); + debug_print(debug_buff); + + while (c) { + g = (struct gaim_callback *)c->data; + if (g->event == event && g->function != NULL) { + switch(event) { + + /* no args */ + case event_signon: + case event_signoff: + case event_away: + case event_back: + case event_blist_update: + case event_quit: + { + void (*function)(void *) = g->function; + (*function)(g->data); + } + break; + + /* char **, char ** */ + case event_im_recv: + { + void (*function)(char **, char **, void *) = g->function; + (*function)(arg1, arg2, g->data); + } + break; + + /* char *, char ** */ + case event_im_send: + { + void (*function)(char *, char **, void *) = g->function; + (*function)(arg1, arg2, g->data); + } + break; + + /* char * */ + case event_buddy_signon: + case event_buddy_signoff: + case event_buddy_away: + case event_buddy_back: + case event_chat_join: + case event_chat_leave: + { + void (*function)(char *, void *) = g->function; + (*function)(arg1, g->data); + } + break; + + /* char *, char *, char * */ + case event_chat_invited: + case event_chat_recv: + case event_chat_send: + { + void (*function)(char *, char *, char *, void *) = g->function; + (*function)(arg1, arg2, arg3, g->data); + } + break; + + /* char *, char * */ + case event_chat_buddy_join: + case event_chat_buddy_leave: + { + void (*function)(char *, char *, void *) = g->function; + (*function)(arg1, arg2, g->data); + } + break; + + /* char *, int */ + case event_warned: + { + void (*function)(char *, int, void *) = g->function; + (*function)(arg1, (int)arg2, g->data); + } + break; + + /* int */ + case event_error: + { + void (*function)(int, void *) = g->function; + (*function)((int)arg1, g->data); + } + break; + + default: + sprintf(debug_buff, "unknown event %d\n", event); + debug_print(debug_buff); + break; + } + } + c = c->next; + } +#endif /* GAIM_PLUGINS */ +#ifdef USE_PERL + /* FIXME : AIM::event_handler */ +#endif +}
