aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-01-31 02:04:43 +0000
committerGravatar Sadie Powell2022-01-31 12:01:39 +0000
commit7d3055f8c3908da493d29191b175be3f810ff05b (patch)
tree0d8def0a5c9452be28121f5f3e930b3f3010b1af /src/modules/m_spanningtree/main.cpp
parentRename the ExtensionItem::type field to extype to avoid collisions. (diff)
Add the type to the Extensible class.
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp5
1 files changed, 2 insertions, 3 deletions
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<User*>(target);
- if (dest && (extname == "uniqueusername"))
- dest->uniqueusername = (extdata != "0");
+ if (target->extype == ExtensionType::USER && irc::equals(extname, "uniqueusername"))
+ static_cast<User*>(target)->uniqueusername = (extdata != "0");
}
Cullable::Result ModuleSpanningTree::Cull()