From dd4f3202ae85b31eb79ddcc9a5d9a15bbb7618d9 Mon Sep 17 00:00:00 2001 From: "Robin C. Ladiges" Date: Mon, 18 Jul 2022 03:30:14 +0200 Subject: [PATCH] change default IP This might otherwise cause confusion with the server.json setting, which should stay at 0.0.0.0. 127.0.0.1 might at least work with emulators running on the same PC out of the box. Whereas 0.0.0.0 should be invalid (except on some systems that map it to localhost). --- source/hooks.cpp | 4 ++-- source/server/Client.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/hooks.cpp b/source/hooks.cpp index 3fc0fad..da9adf0 100644 --- a/source/hooks.cpp +++ b/source/hooks.cpp @@ -44,7 +44,7 @@ void saveWriteHook(al::ByamlWriter* saveByml) { if (serverIP) { saveByml->addString("ServerIP", serverIP); } else { - saveByml->addString("ServerIP", "0.0.0.0"); + saveByml->addString("ServerIP", "127.0.0.1"); } if (serverPort) { @@ -168,4 +168,4 @@ bool borderPullBackHook(WorldEndBorderKeeper* thisPtr) { } return isFirstStep; -} \ No newline at end of file +} diff --git a/source/server/Client.cpp b/source/server/Client.cpp index 9a339ef..3a72bf1 100644 --- a/source/server/Client.cpp +++ b/source/server/Client.cpp @@ -230,7 +230,7 @@ bool Client::startConnection() { if (mServerIP.isEmpty() || isOverride) { mKeyboard->setHeaderText(u"Save File does not contain an IP!"); mKeyboard->setSubText(u"Please set a Server IP Below."); - mServerIP = "0.0.0.0"; + mServerIP = "127.0.0.1"; Client::openKeyboardIP(); isNeedSave = true; }