#define BANREASONLEN 390 /* kline/dline */
#define AWAYLEN TOPICLEN
#define KILLLEN 200 /* with Killed (nick ()) added this should fit in quit */
+#define METADATAKEYLEN 31
+/* :012345678901234567890123456789012345678901234567890123456789123 792 * 012345678901234567890123456789 012345678901234567890123456789 :
+ * takes at most 137 bytes
+ * :123456789 ENCAP * PRESENCE 012345678901234567890123456789 :
+ * takes at most 63 bytes
+ * */
+#define METADATAVALUELEN 300
/* 23+1 for \0 */
#define KEYLEN 24
if (md == NULL)
{
md = rb_bh_alloc(metadata_heap);
- rb_strlcpy(md->key, key, NICKLEN);
+ rb_strlcpy(md->key, key, sizeof md->key);
irc_dictionary_add(client_p->user->metadata, md->key, md);
}
else if (!strcmp(md->key, key) && !strcmp(md->value, value))
return;
else
- rb_strlcpy(md->key, key, NICKLEN);
+ rb_strlcpy(md->key, key, sizeof md->key);
- rb_strlcpy(md->value, value, TOPICLEN);
+ rb_strlcpy(md->value, value, sizeof md->value);
}
sendto_common_channels_local_with_capability(client_p, CLICAP_PRESENCE, form_str(RPL_METADATACHG), me.name, client_p->name, key, value);