summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/commandbuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/commandbuilder.h')
-rw-r--r--src/modules/m_spanningtree/commandbuilder.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/commandbuilder.h b/src/modules/m_spanningtree/commandbuilder.h
index 59de84052..4bbb60e47 100644
--- a/src/modules/m_spanningtree/commandbuilder.h
+++ b/src/modules/m_spanningtree/commandbuilder.h
@@ -119,6 +119,30 @@ class CmdBuilder
return *this;
}
+ CmdBuilder& push_tags(const ClientProtocol::TagMap& tags)
+ {
+ if (!tags.empty())
+ {
+ char separator = '@';
+ std::string taglist;
+ for (ClientProtocol::TagMap::const_iterator iter = tags.begin(); iter != tags.end(); ++iter)
+ {
+ taglist.push_back(separator);
+ separator = ';';
+
+ taglist.append(iter->first);
+ if (!iter->second.value.empty())
+ {
+ taglist.push_back('=');
+ taglist.append(iter->second.value);
+ }
+ }
+ taglist.push_back(' ');
+ content.insert(0, taglist);
+ }
+ return *this;
+ }
+
template<typename T>
CmdBuilder& insert(const T& cont)
{