From 1a800f7b3db23cdef7e167cd25c0f3b2a64a8e46 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 9 Apr 2020 18:57:50 +0100 Subject: Improve storage of module description, flags, and link data. --- src/modules/m_spanningtree/main.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 10c380c54..c4d559612 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -40,7 +40,8 @@ #include "translate.h" ModuleSpanningTree::ModuleSpanningTree() - : Away::EventListener(this) + : Module(VF_VENDOR, "Allows servers to be linked") + , Away::EventListener(this) , Stats::EventListener(this) , CTCTags::EventListener(this) , rconnect(this) @@ -665,12 +666,15 @@ void ModuleSpanningTree::OnLoadModule(Module* mod) std::string data; data.push_back('+'); data.append(mod->ModuleSourceFile); - Version v = mod->GetVersion(); - if (!v.link_data.empty()) + + std::string link_data; + mod->GetLinkData(link_data); + if (!link_data.empty()) { data.push_back('='); - data.append(v.link_data); + data.append(link_data); } + ServerInstance->PI->SendMetaData("modules", data); } @@ -816,11 +820,6 @@ ModuleSpanningTree::~ModuleSpanningTree() delete Utils; } -Version ModuleSpanningTree::GetVersion() -{ - return Version("Allows servers to be linked", VF_VENDOR); -} - /* It is IMPORTANT that m_spanningtree is the last module in the chain * so that any activity it sees is FINAL, e.g. we arent going to send out * a NICK message before m_cloaking has finished putting the +x on the user, -- cgit v1.3.1-10-gc9f91