aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/capab.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2020-11-04 13:31:03 +0000
committerGravatar Sadie Powell2020-11-04 13:37:14 +0000
commit2310b03ad503a2712f868d52ce37ec6a3943e261 (patch)
treef1fde6b7045d0c545f87809bc2afb3f596f23e4c /src/modules/m_spanningtree/capab.cpp
parentMove config typedefs to ServerConfig and use auto in more places. (diff)
Initial support for platform-specific module file extensions.
Diffstat (limited to 'src/modules/m_spanningtree/capab.cpp')
-rw-r--r--src/modules/m_spanningtree/capab.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp
index e3efc1463..698e0f0ba 100644
--- a/src/modules/m_spanningtree/capab.cpp
+++ b/src/modules/m_spanningtree/capab.cpp
@@ -47,6 +47,10 @@ std::string TreeSocket::MyModules(int filter)
if (i != modlist.begin())
capabilities.push_back(' ');
+ std::string modname = i->first;
+ modname.replace(modname.end() - strlen(DLL_EXTENSION) - 1, modname.end(), ".so");
+ capabilities.append(modname);
+
std::string link_data;
mod->GetLinkData(link_data);
if (!link_data.empty())
@@ -204,7 +208,7 @@ void TreeSocket::SendCapabilities(int phase)
// in 2.0, we advertise it here to not break linking to previous versions.
// Protocol version 1201 (1.2) does not have this issue because we advertise m_globops
// to 1201 protocol servers irrespectively of its module flags.
- (ServerInstance->Modules.Find("m_globops.so") != NULL ? " GLOBOPS=1" : " GLOBOPS=0")
+ (ServerInstance->Modules.Find("globops") != NULL ? " GLOBOPS=1" : " GLOBOPS=0")
);
this->WriteLine("CAPAB END");