aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/bansystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/bansystem.cpp')
-rw-r--r--NorthstarDedicatedTest/bansystem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/bansystem.cpp b/NorthstarDedicatedTest/bansystem.cpp
index a4d994d0..b9e3fd33 100644
--- a/NorthstarDedicatedTest/bansystem.cpp
+++ b/NorthstarDedicatedTest/bansystem.cpp
@@ -5,14 +5,15 @@
#include "concommand.h"
#include "miscserverscript.h"
#include <filesystem>
+#include "configurables.h"
-const char* BANLIST_PATH = "R2Northstar/banlist.txt";
+const char* BANLIST_PATH_SUFFIX = "/banlist.txt";
ServerBanSystem* g_ServerBanSystem;
void ServerBanSystem::OpenBanlist()
{
- std::ifstream enabledModsStream(BANLIST_PATH);
+ std::ifstream enabledModsStream(GetNorthstarPrefix() + "/banlist.txt");
std::stringstream enabledModsStringStream;
if (!enabledModsStream.fail())
@@ -25,7 +26,7 @@ void ServerBanSystem::OpenBanlist()
}
// open write stream for banlist
- m_sBanlistStream.open(BANLIST_PATH, std::ofstream::out | std::ofstream::binary | std::ofstream::app);
+ m_sBanlistStream.open(GetNorthstarPrefix() + "/banlist.txt", std::ofstream::out | std::ofstream::binary | std::ofstream::app);
}
void ServerBanSystem::ClearBanlist()
@@ -34,7 +35,7 @@ void ServerBanSystem::ClearBanlist()
// reopen the file, don't provide std::ofstream::app so it clears on open
m_sBanlistStream.close();
- m_sBanlistStream.open(BANLIST_PATH, std::ofstream::out | std::ofstream::binary);
+ m_sBanlistStream.open(GetNorthstarPrefix() + "/banlist.txt", std::ofstream::out | std::ofstream::binary);
}
void ServerBanSystem::BanUID(uint64_t uid)