Mercurial > pidgin
changeset 2359:ad56a93661fc
[gaim-migrate @ 2372]
hi usa
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 26 Sep 2001 00:53:49 +0000 |
parents | 202222f100b6 |
children | 8a304d8c5ce3 |
files | plugins/SIGNALS src/plugins.c src/server.c |
diffstat | 3 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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.
--- 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,
--- 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)