diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-01-18 10:42:39 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-01-18 10:42:39 +0100 |
commit | 9e64fb83aab4f4c0c6964fcdbef4bca0846e930a (patch) | |
tree | 896f3a3b505e6ed5d31f0351bb0994b65ad96f6f /src | |
parent | 4fc2f7199e964ba5112ecdb2613c6fd5c2eee638 (diff) |
m_spanningtree Only unserialize() METADATA if the object type matches ExtensionItem::type
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/metadata.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp index 13ccabc35..f758754b4 100644 --- a/src/modules/m_spanningtree/metadata.cpp +++ b/src/modules/m_spanningtree/metadata.cpp @@ -49,7 +49,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, std::vector<std::string>& param std::string value = params.size() < 4 ? "" : params[3]; ExtensionItem* item = ServerInstance->Extensions.GetItem(params[2]); - if (item) + if ((item) && (item->type == ExtensionItem::EXT_CHANNEL)) item->unserialize(FORMAT_NETWORK, c, value); FOREACH_MOD(OnDecodeMetaData, (c,params[2],value)); } @@ -61,7 +61,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, std::vector<std::string>& param ExtensionItem* item = ServerInstance->Extensions.GetItem(params[1]); std::string value = params.size() < 3 ? "" : params[2]; - if (item) + if ((item) && (item->type == ExtensionItem::EXT_USER)) item->unserialize(FORMAT_NETWORK, u, value); FOREACH_MOD(OnDecodeMetaData, (u,params[1],value)); } |