TagPrint: omit tags which were disabled by the client

Closes #471
This commit is contained in:
Max Kellermann 2019-02-22 13:05:38 +01:00
parent e8f2f98048
commit 834ad7a58f

View File

@ -25,8 +25,9 @@
void void
tag_print_types(Response &r) noexcept tag_print_types(Response &r) noexcept
{ {
const auto tag_mask = global_tag_mask & r.GetTagMask();
for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++) for (unsigned i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
if (IsTagEnabled(i)) if (tag_mask.Test(TagType(i)))
r.Format("tagtype: %s\n", tag_item_names[i]); r.Format("tagtype: %s\n", tag_item_names[i]);
} }