From 7d3055f8c3908da493d29191b175be3f810ff05b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 31 Jan 2022 02:04:43 +0000 Subject: Add the type to the Extensible class. --- src/modules/m_spanningtree/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (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 70005841f..98dda1800 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -851,9 +851,8 @@ void ModuleSpanningTree::OnShutdown(const std::string& reason) 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 = (extdata != "0"); + if (target->extype == ExtensionType::USER && irc::equals(extname, "uniqueusername")) + static_cast(target)->uniqueusername = (extdata != "0"); } Cullable::Result ModuleSpanningTree::Cull() -- cgit v1.3.1-10-gc9f91