diff options
| author | 2022-06-26 17:01:54 +0100 | |
|---|---|---|
| committer | 2022-06-26 17:01:54 +0100 | |
| commit | dc3df034062a3faccb9ed0777e99dde89776d52e (patch) | |
| tree | 3a7c6adb83752578758791f4843b10695e0aac4f /src | |
| parent | Make clientprotocol{msg,event} and numericbuilder non-default headers. (diff) | |
Fix various bugs relating to platform-native module extensions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/configreader.cpp | 7 | ||||
| -rw-r--r-- | src/coremods/core_loadmodule.cpp | 2 | ||||
| -rw-r--r-- | src/modules.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_globalload.cpp | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 94c1ca195..4faaa2ab7 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -39,10 +39,9 @@ #endif #include "inspircd.h" -#include "xline.h" -#include "listmode.h" -#include "exitcodes.h" #include "configparser.h" +#include "exitcodes.h" +#include "xline.h" ServerLimits::ServerLimits(std::shared_ptr<ConfigTag> tag) : MaxLine(tag->getUInt("maxline", 512, 512)) @@ -541,7 +540,7 @@ void ServerConfig::ApplyModules(User* user) for (const auto& [modname, mod] : removed_modules) { // Don't remove core_*, just remove m_* - if (InspIRCd::Match(modname, "core_*" DLL_EXTENSION, ascii_case_insensitive_map)) + if (InspIRCd::Match(modname, "core_*", ascii_case_insensitive_map)) continue; if (ServerInstance->Modules.Unload(mod)) { diff --git a/src/coremods/core_loadmodule.cpp b/src/coremods/core_loadmodule.cpp index ffad143c1..043807881 100644 --- a/src/coremods/core_loadmodule.cpp +++ b/src/coremods/core_loadmodule.cpp @@ -71,7 +71,7 @@ public: CmdResult CommandUnloadmodule::Handle(User* user, const Params& parameters) { - if (InspIRCd::Match(parameters[0], "core_*" DLL_EXTENSION, ascii_case_insensitive_map)) + if (InspIRCd::Match(parameters[0], "core_*", ascii_case_insensitive_map)) { user->WriteNumeric(ERR_CANTUNLOADMODULE, parameters[0], "You cannot unload core commands!"); return CmdResult::FAILURE; diff --git a/src/modules.cpp b/src/modules.cpp index c16ddf5ef..9e89b027e 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -671,7 +671,7 @@ std::string ModuleManager::ShrinkModName(const std::string& modname) { const static size_t extlen = strlen(DLL_EXTENSION); size_t startpos = modname.compare(0, 2, "m_", 2) ? 0 : 2; - size_t endpos = modname.length() < extlen || modname.compare(modname.length() - extlen, extlen, ".so", extlen) ? 0 : extlen; + size_t endpos = modname.length() < extlen || modname.compare(modname.length() - extlen, extlen, DLL_EXTENSION, extlen) ? 0 : extlen; return modname.substr(startpos, modname.length() - endpos - startpos); } diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 5dc4ef170..6e9a0f861 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -80,7 +80,7 @@ public: CmdResult Handle(User* user, const Params& parameters) override { - if (InspIRCd::Match(parameters[0], "core_*" DLL_EXTENSION, ascii_case_insensitive_map)) + if (InspIRCd::Match(parameters[0], "core_*", ascii_case_insensitive_map)) { user->WriteRemoteNumeric(ERR_CANTUNLOADMODULE, parameters[0], "You cannot unload core commands!"); return CmdResult::FAILURE; |
