mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 12:57:04 +02:00
update: Add DefaultServerIP in config
This commit is contained in:
parent
6928f57111
commit
eaab9e3000
3 changed files with 6 additions and 2 deletions
|
|
@ -46,11 +46,11 @@ public class ServerManager
|
|||
}
|
||||
}
|
||||
|
||||
var address = $"{ipAddress}:{ConVar.Find("hostport")?.GetPrimitiveValue<int>()}";
|
||||
string? address = !string.IsNullOrWhiteSpace(CS2_SimpleAdmin.Instance.Config.DefaultServerIP) ? CS2_SimpleAdmin.Instance.Config.DefaultServerIP : $"{ipAddress}:{ConVar.Find("hostport")?.GetPrimitiveValue<int>()}";
|
||||
var hostname = ConVar.Find("hostname")!.StringValue;
|
||||
var rcon = ConVar.Find("rcon_password")!.StringValue;
|
||||
CS2_SimpleAdmin.IpAddress = address;
|
||||
|
||||
|
||||
CS2_SimpleAdmin._logger?.LogInformation("Loaded server with ip {ip}", ipAddress);
|
||||
|
||||
Task.Run(async () =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue