hook_data_client hdata;
int visible;
int extra_space = 0;
+ struct DictionaryIter iter;
+ struct MetadataEntry *md;
if(target_p->user == NULL)
{
target_p->name, target_p->servptr->name,
target_p->servptr->info);
- if((awaymsg = get_metadata(target_p, "away")) != NULL)
+ if(!IsCapable(source_p, CLICAP_PRESENCE) && (awaymsg = get_metadata(target_p, "away")) != NULL)
sendto_one_numeric(source_p, RPL_AWAY, form_str(RPL_AWAY),
target_p->name, awaymsg);
}
}
+ DICTIONARY_FOREACH(md, &iter, target_p->user->metadata)
+ {
+ /* XXX: hack around "away" for legacy clients. --nenolod */
+ if (!IsCapable(source_p, CLICAP_PRESENCE) && !irccmp(md->key, "away"))
+ continue;
+
+ sendto_one_numeric(source_p, RPL_WHOISMETADATA,
+ form_str(RPL_WHOISMETADATA),
+ target_p->name, md->key, md->value);
+ }
+
hdata.client = source_p;
hdata.target = target_p;