diff options
| author | 2019-01-02 17:31:31 +0000 | |
|---|---|---|
| committer | 2019-01-02 20:28:46 +0000 | |
| commit | aafc03bdfc34c9426df44938403c92dbbbc0568e (patch) | |
| tree | 9213bee0804ad12bfdb75972597a4fce0420b63f /src/modules/m_spanningtree/commandbuilder.h | |
| parent | Strip message tags when talking with 1202 protocol servers. (diff) | |
Fix message tags not being broadcast across the network.
Diffstat (limited to 'src/modules/m_spanningtree/commandbuilder.h')
| -rw-r--r-- | src/modules/m_spanningtree/commandbuilder.h | 24 |
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) { |
