summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-08-07 13:40:01 +0100
committerPeter Powell <petpow@saberuk.com>2019-08-07 16:38:15 +0100
commit85182d727c0d549b9cf6659ad36dec70fcf02278 (patch)
tree4444b9b1a392de7a63ad81a78b5a9c934432063c /src/modules/m_spanningtree
parent704f0fca5fea4c99a1d21cdb9418d16f7278fcaa (diff)
Add {To,From}{Human,Internal,Network} to ExtensionItem.
Also, deprecate the old SerializeFormat/serialize/unserialise API.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/modules/m_spanningtree/metadata.cpp4
-rw-r--r--src/modules/m_spanningtree/netburst.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 484d72e6d..43417bc3c 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -486,7 +486,7 @@ void ModuleSpanningTree::OnUserConnect(LocalUser* user)
for(Extensible::ExtensibleStore::const_iterator i = user->GetExtList().begin(); i != user->GetExtList().end(); i++)
{
ExtensionItem* item = i->first;
- std::string value = item->serialize(FORMAT_NETWORK, user, i->second);
+ std::string value = item->ToNetwork(user, i->second);
if (!value.empty())
ServerInstance->PI->SendMetaData(user, item->name, value);
}
diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp
index 52267c522..816d0758a 100644
--- a/src/modules/m_spanningtree/metadata.cpp
+++ b/src/modules/m_spanningtree/metadata.cpp
@@ -50,7 +50,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params)
ExtensionItem* item = ServerInstance->Extensions.GetItem(params[2]);
if ((item) && (item->type == ExtensionItem::EXT_CHANNEL))
- item->unserialize(FORMAT_NETWORK, c, value);
+ item->FromNetwork(c, value);
FOREACH_MOD(OnDecodeMetaData, (c,params[2],value));
}
else
@@ -62,7 +62,7 @@ CmdResult CommandMetadata::Handle(User* srcuser, Params& params)
std::string value = params.size() < 3 ? "" : params[2];
if ((item) && (item->type == ExtensionItem::EXT_USER))
- item->unserialize(FORMAT_NETWORK, u, value);
+ item->FromNetwork(u, value);
FOREACH_MOD(OnDecodeMetaData, (u,params[1],value));
}
}
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index f3f2ea7ac..6d6ada9a5 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -259,7 +259,7 @@ void TreeSocket::SyncChannel(Channel* chan, BurstState& bs)
for (Extensible::ExtensibleStore::const_iterator i = chan->GetExtList().begin(); i != chan->GetExtList().end(); i++)
{
ExtensionItem* item = i->first;
- std::string value = item->serialize(FORMAT_NETWORK, chan, i->second);
+ std::string value = item->ToNetwork(chan, i->second);
if (!value.empty())
this->WriteLine(CommandMetadata::Builder(chan, item->name, value));
}
@@ -295,7 +295,7 @@ void TreeSocket::SendUsers(BurstState& bs)
for (Extensible::ExtensibleStore::const_iterator i = exts.begin(); i != exts.end(); ++i)
{
ExtensionItem* item = i->first;
- std::string value = item->serialize(FORMAT_NETWORK, u->second, i->second);
+ std::string value = item->ToNetwork(u->second, i->second);
if (!value.empty())
this->WriteLine(CommandMetadata::Builder(user, item->name, value));
}