# HG changeset patch # User Eric Warmenhoven # Date 988187686 0 # Node ID 5bfc58c20e825355976bc3b67abc32ddadeab584 # Parent 2eec724fdbcd2ab750cd80164a130dc4410cad2a [gaim-migrate @ 1759] patch from sean egan for event_set_info. why this would be necessary... i guess we'll see :) committer: Tailor Script diff -r 2eec724fdbcd -r 5bfc58c20e82 plugins/SIGNALS --- a/plugins/SIGNALS Wed Apr 25 08:17:38 2001 +0000 +++ b/plugins/SIGNALS Wed Apr 25 08:34:46 2001 +0000 @@ -22,7 +22,8 @@ event_warned, event_error, event_quit, - event_new_conversation + event_new_conversation, + event_set_info }; To add a signal handler, call the fuction gaim_signal_connect with the @@ -249,3 +250,9 @@ 'who' is who the conversation is with. This gets called when a new conversation window is created. You can use find_conversation(char *) to then find the struct conversation * and modify those values. + +event_set_info: + struct gaim_connection *gc, char *info + + Called when the user sends his profile to the server. 'info' is the + profile being sent. diff -r 2eec724fdbcd -r 5bfc58c20e82 src/gaim.h --- a/src/gaim.h Wed Apr 25 08:17:38 2001 +0000 +++ b/src/gaim.h Wed Apr 25 08:34:46 2001 +0000 @@ -190,6 +190,7 @@ event_error, event_quit, event_new_conversation, + event_set_info, /* any others? it's easy to add... */ }; diff -r 2eec724fdbcd -r 5bfc58c20e82 src/plugins.c --- a/src/plugins.c Wed Apr 25 08:17:38 2001 +0000 +++ b/src/plugins.c Wed Apr 25 08:34:46 2001 +0000 @@ -622,6 +622,9 @@ case event_new_conversation: sprintf(buf, "event_new_conversation"); break; + case event_set_info: + sprintf(buf, "event_set_info"); + break; default: sprintf(buf, "event_unknown"); break; @@ -691,6 +694,7 @@ case event_buddy_back: case event_buddy_idle: case event_buddy_unidle: + case event_set_info: { void (*function)(struct gaim_connection *, char *, void *) = g->function; @@ -784,6 +788,9 @@ case event_buddy_signoff: g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); break; + case event_set_info: + g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); + break; case event_buddy_away: g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); break; diff -r 2eec724fdbcd -r 5bfc58c20e82 src/server.c --- a/src/server.c Wed Apr 25 08:17:38 2001 +0000 +++ b/src/server.c Wed Apr 25 08:34:46 2001 +0000 @@ -183,8 +183,10 @@ void serv_set_info(struct gaim_connection *g, char *info) { - if (g->prpl && g->prpl->set_info) + if (g->prpl && g->prpl->set_info) { + plugin_event(event_set_info, g, info, 0, 0); (*g->prpl->set_info)(g, info); + } } void serv_change_passwd(struct gaim_connection *g, char *orig, char *new)