From 48c5e056ca4b994d665700bd3c471fa93a43b2c8 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 2 Jun 2009 02:36:18 -0500 Subject: [PATCH] presence: Broadcast presence changes to peer clients with CLICAP_PRESENCE. --- src/client.c | 4 ++++ src/messages.tab | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index dcbebcb0..bbfd7d17 100644 --- a/src/client.c +++ b/src/client.c @@ -1756,6 +1756,8 @@ set_metadata(struct Client *client_p, const char *key, const char *value) irc_dictionary_add(client_p->user->metadata, md->key, md); } + + sendto_common_channels_local_with_capability(client_p, CLICAP_PRESENCE, form_str(RPL_METADATACHG), me.name, client_p->name, key, value); } void @@ -1771,6 +1773,8 @@ delete_metadata(struct Client *client_p, const char *key) rb_free(md); } + + sendto_common_channels_local_with_capability(client_p, CLICAP_PRESENCE, form_str(RPL_METADATACHG), me.name, client_p->name, key, ""); } void diff --git a/src/messages.tab b/src/messages.tab index 7ce3dba0..4c2a0267 100644 --- a/src/messages.tab +++ b/src/messages.tab @@ -813,7 +813,7 @@ static const char * replies[] = { /* 789 */ NULL, /* 790 RPL_METADATASET */ "%s :Metadata set", /* 791 RPL_METADATAREM */ "%s :Metadata removed", -/* 792 RPL_METADATACHG */ "%s %s :%s", +/* 792 RPL_METADATACHG */ ":%s 792 * %s %s :%s", /* 793 RPL_WHOISMETADATA */ "%s %s :%s", /* 794 */ NULL, /* 795 */ NULL,