saving ip (#230)

This commit is contained in:
AmazingAlek 2020-12-19 21:40:54 +01:00 committed by GitHub
parent d7de691807
commit 1d4c598958
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,14 @@ namespace QSB
QSBNetworkServer.SpawnWithClientAuthority(Instantiate(_probePrefab), connection);
}
public override void OnStartClient(QSBNetworkClient _)
{
DebugLog.DebugWrite($"Setting defaultServerIP to {networkAddress}");
var config = QSBCore.Helper.Config;
config.SetSettingsValue("defaultServerIP", networkAddress);
QSBCore.Helper.Storage.Save(config, Constants.ModConfigFileName);
}
public override void OnClientConnect(QSBNetworkConnection connection) // Called on the client when connecting to a server
{
DebugLog.DebugWrite("OnClientConnect", MessageType.Info);