changeset 1749:5bfc58c20e82

[gaim-migrate @ 1759] patch from sean egan for event_set_info. why this would be necessary... i guess we'll see :) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 25 Apr 2001 08:34:46 +0000
parents 2eec724fdbcd
children d2eca7a46cfd
files plugins/SIGNALS src/gaim.h src/plugins.c src/server.c
diffstat 4 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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. 
--- 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... */
 };
 
--- 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;
--- 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)