summaryrefslogtreecommitdiff
path: root/bouncer/netcore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bouncer/netcore.cpp')
-rw-r--r--bouncer/netcore.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/bouncer/netcore.cpp b/bouncer/netcore.cpp
index f8c484e..98f13a1 100644
--- a/bouncer/netcore.cpp
+++ b/bouncer/netcore.cpp
@@ -329,6 +329,10 @@ void NetCore::loadConfig() {
auto sections = INI::load("config.ini");
for (auto &section : sections) {
+ if (section.title == "Header") {
+ bouncerPassword = section.data["password"];
+ }
+
if (section.title == "Server" && serverCount < SERVER_LIMIT) {
Server *s = constructServer(section.data["type"].c_str());
if (s) {
@@ -342,6 +346,13 @@ void NetCore::loadConfig() {
void NetCore::saveConfig() {
std::list<INI::Section> sections;
+ INI::Section header;
+ header.title = "Header";
+
+ header.data["password"] = bouncerPassword;
+
+ sections.push_back(header);
+
for (int i = 0; i < serverCount; i++) {
INI::Section section;
section.title = "Server";