]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/client.c
presence: send..._with_capability...(): don't send if the client does not have the...
[irc/rqf/shadowircd.git] / src / client.c
index dcbebcb0a5aeb0342aa30376a814d7cbc82ffb0c..5cee85867cb2f6074de948a072bbcb8324ececdf 100644 (file)
@@ -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
@@ -1769,8 +1771,10 @@ delete_metadata(struct Client *client_p, const char *key)
                if (md == NULL)
                        return;
 
-               rb_free(md);
+               rb_bh_free(metadata_heap, md);
        }
+
+       sendto_common_channels_local_with_capability(client_p, CLICAP_PRESENCE, form_str(RPL_METADATACHG), me.name, client_p->name, key, "");
 }
 
 void