summaryrefslogtreecommitdiff
path: root/src/modulemanager.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-09 14:35:49 +0000
committerSadie Powell <sadie@witchery.services>2024-01-09 14:35:49 +0000
commitfa7ad6b3dffaa769b62ea00e7c52e29fca67c7bf (patch)
treed5a63fc4fae57b07baf4240377f7b8a357f9de92 /src/modulemanager.cpp
parentfc2df00cfcb51d9c5cf3640285e91e7d55c23eff (diff)
Use native file extensions on macOS and Windows.
Diffstat (limited to 'src/modulemanager.cpp')
-rw-r--r--src/modulemanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index cbb3460a9..f210593b8 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -55,7 +55,7 @@ void ModuleManager::CleanupRuntimeDirectory()
*/
static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &output)
{
- Anope::string input = Anope::ModuleDir + "/modules/" + name + ".so";
+ Anope::string input = Anope::ModuleDir + "/modules/" + name + DLL_EXT;
struct stat s;
if (stat(input.c_str(), &s) == -1)
@@ -133,7 +133,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
#ifdef _WIN32
/* Generate the filename for the temporary copy of the module */
- Anope::string pbuf = Anope::DataDir + "/runtime/" + modname + ".so.XXXXXX";
+ Anope::string pbuf = Anope::DataDir + "/runtime/" + modname + DLL_EXT ".XXXXXX";
/* Don't skip return value checking! -GD */
ModuleReturn ret = moduleCopyFile(modname, pbuf);
@@ -146,7 +146,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
return ret;
}
#else
- Anope::string pbuf = Anope::ModuleDir + "/modules/" + modname + ".so";
+ Anope::string pbuf = Anope::ModuleDir + "/modules/" + modname + DLL_EXT;
#endif
dlerror();