diff options
Diffstat (limited to 'NorthstarDedicatedTest/dllmain.cpp')
-rw-r--r-- | NorthstarDedicatedTest/dllmain.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/dllmain.cpp b/NorthstarDedicatedTest/dllmain.cpp index 4d55b6e5..53e8d59f 100644 --- a/NorthstarDedicatedTest/dllmain.cpp +++ b/NorthstarDedicatedTest/dllmain.cpp @@ -37,6 +37,7 @@ #include "serverchathooks.h" #include "clientchathooks.h" #include "localchatwriter.h" +#include "scriptservertoclientstringcommand.h" #include "plugin_abi.h" #include "plugins.h" #include "host_state.h" @@ -91,7 +92,11 @@ bool LoadPlugins() std::vector<fs::path> paths; std::string pluginPath = GetNorthstarPrefix() + "/plugins"; - + if (!fs::exists(pluginPath)) + { + spdlog::warn("Could not find a plugins directory. Skipped loading plugins"); + return false; + } // ensure dirs exist fs::recursive_directory_iterator iterator(pluginPath); if (std::filesystem::begin(iterator) == std::filesystem::end(iterator)) @@ -104,9 +109,7 @@ bool LoadPlugins() if (fs::is_regular_file(entry) && entry.path().extension() == ".dll") paths.emplace_back(entry.path().filename()); } - // system("pause"); initGameState(); - // spdlog::info("Loading the following DLLs in plugins folder:"); for (fs::path path : paths) { std::string pathstring = (pluginPath / path).string(); @@ -237,6 +240,7 @@ bool InitialiseNorthstar() AddDllLoadCallback("client.dll", InitialisePluginCommands); AddDllLoadCallback("client.dll", InitialiseClientChatHooks); AddDllLoadCallback("client.dll", InitialiseLocalChatWriter); + AddDllLoadCallback("client.dll", InitialiseScriptServerToClientStringCommands); } AddDllLoadCallback("engine.dll", InitialiseEngineSpewFuncHooks); |