From 64340dc50901f88336d9a2933dad98b462b6f36b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 14 Dec 2021 15:48:57 +0000 Subject: Sync uniqueusername from the connect class to the user. This is a massive hack for now but should be made to sync properly in v4 when we have extensibles that don't suck. --- src/modules/m_spanningtree/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index c829b31d3..5e30469e9 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -803,6 +803,14 @@ void ModuleSpanningTree::OnShutdown(const std::string& reason) children.front()->SQuit(reason, true); } +void ModuleSpanningTree::OnDecodeMetaData(Extensible* target, const std::string& extname, const std::string& extdata) +{ + // HACK: this should use automatically synced user metadata in v4. + User* dest = static_cast(target); + if (dest && (extname == "uniqueusername")) + dest->uniqueusername = true; +} + CullResult ModuleSpanningTree::cull() { if (Utils) -- cgit v1.3.1-10-gc9f91