# HG changeset patch # User Eric Warmenhoven # Date 1001465629 0 # Node ID ad56a93661fcbe8e3f484618375b31f93be49c7d # Parent 202222f100b640b524bf717e2c807534d49dc76e [gaim-migrate @ 2372] hi usa committer: Tailor Script diff -r 202222f100b6 -r ad56a93661fc plugins/SIGNALS --- a/plugins/SIGNALS Tue Sep 25 20:00:05 2001 +0000 +++ b/plugins/SIGNALS Wed Sep 26 00:53:49 2001 +0000 @@ -303,7 +303,7 @@ 'flags' is flags on the message. event_chat_send_invite: - struct gaim_connection *gc, int id, char *who, char *msg + struct gaim_connection *gc, int id, char *who, char **msg This is called just before you're about to invite someone. It's useful for if you want to pass someone a key so that they can @@ -312,4 +312,5 @@ 'gc' is the connection the invite is sent on. 'id' is the id of the room you're inviting them to. 'who' is who you're inviting. - 'msg' is the message they'll receive when they're invited. + 'msg' is the message they'll receive when they're invited. It may be + NULL. Setting this to NULL won't stop the invitation from going thru. diff -r 202222f100b6 -r ad56a93661fc src/plugins.c --- a/src/plugins.c Tue Sep 25 20:00:05 2001 +0000 +++ b/src/plugins.c Wed Sep 26 00:53:49 2001 +0000 @@ -867,7 +867,7 @@ case event_chat_recv: case event_chat_send_invite: g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, - (int)arg2, (char *)arg3, (char *)arg4); + (int)arg2, (char *)arg3, *(char **)arg4 ? *(char **)arg4 : "(null)"); break; case event_chat_send: g_snprintf(buf, sizeof buf, "%lu %d %s", (unsigned long)arg1, (int)arg2, diff -r 202222f100b6 -r ad56a93661fc src/server.c --- a/src/server.c Tue Sep 25 20:00:05 2001 +0000 +++ b/src/server.c Wed Sep 26 00:53:49 2001 +0000 @@ -302,9 +302,12 @@ void serv_chat_invite(struct gaim_connection *g, int id, char *message, char *name) { - plugin_event(event_chat_send_invite, g, (void *)id, name, message); + char *buffy = message && *message ? g_strdup(message) : NULL; + plugin_event(event_chat_send_invite, g, (void *)id, name, &buffy); if (g->prpl && g->prpl->chat_invite) - (*g->prpl->chat_invite)(g, id, message, name); + (*g->prpl->chat_invite)(g, id, buffy, name); + if (buffy) + g_free(buffy); } void serv_chat_leave(struct gaim_connection *g, int id)