diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-14 18:39:38 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-14 18:39:38 +0000 |
commit | e80a1296a096ff2c495b3cd2a3913d5e5f6ec450 (patch) | |
tree | b8e37d6b9eeb0d0bed0ae4d4cbaa249631405c8d /src/modules/m_spanningtree | |
parent | 37fd031da06761c8a050105b55d73a8ab499fb74 (diff) |
Move static map of extensions into ServerInstance, add const-correctness
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11873 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/metadata.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 16 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp index ee26f0c73..4e87dae00 100644 --- a/src/modules/m_spanningtree/metadata.cpp +++ b/src/modules/m_spanningtree/metadata.cpp @@ -18,9 +18,6 @@ #include "treeserver.h" #include "utils.h" -/* $ModDep: m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ - - bool TreeSocket::MetaData(const std::string &prefix, parameterlist ¶ms) { if (params.size() < 2) @@ -28,7 +25,7 @@ bool TreeSocket::MetaData(const std::string &prefix, parameterlist ¶ms) else if (params.size() < 3) params.push_back(""); TreeServer* ServerSource = Utils->FindServer(prefix); - ExtensionItem* item = Extensible::GetItem(params[1]); + ExtensionItem* item = ServerInstance->Extensions.GetItem(params[1]); if (ServerSource) { if (params[0] == "*") diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index b8d8c93ee..5f47c690b 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -222,12 +222,10 @@ void TreeSocket::SendChannelModes(TreeServer* Current) for(ExtensibleStore::const_iterator i = c->second->GetExtList().begin(); i != c->second->GetExtList().end(); i++) { - ExtensionItem* item = Extensible::GetItem(i->first); - std::string value; - if (item) - value = item->serialize(FORMAT_NETWORK, c->second, i->second); + ExtensionItem* item = i->first; + std::string value = item->serialize(FORMAT_NETWORK, c->second, i->second); if (!value.empty()) - Utils->Creator->ProtoSendMetaData(this, c->second, i->first, value); + Utils->Creator->ProtoSendMetaData(this, c->second, item->key, value); } FOREACH_MOD(I_OnSyncChannel,OnSyncChannel(c->second,Utils->Creator,this)); @@ -273,12 +271,10 @@ void TreeSocket::SendUsers(TreeServer* Current) for(ExtensibleStore::const_iterator i = u->second->GetExtList().begin(); i != u->second->GetExtList().end(); i++) { - ExtensionItem* item = Extensible::GetItem(i->first); - std::string value; - if (item) - value = item->serialize(FORMAT_NETWORK, u->second, i->second); + ExtensionItem* item = i->first; + std::string value = item->serialize(FORMAT_NETWORK, u->second, i->second); if (!value.empty()) - Utils->Creator->ProtoSendMetaData(this, u->second, i->first, value); + Utils->Creator->ProtoSendMetaData(this, u->second, item->key, value); } FOREACH_MOD(I_OnSyncUser,OnSyncUser(u->second,Utils->Creator,this)); |