update references from IP to ListenAddress
This commit is contained in:
@ -85,9 +85,14 @@ namespace SharedLibraryCore
|
||||
InitializeAutoMessages();
|
||||
}
|
||||
|
||||
public long EndPoint => IPAddress.TryParse(IP, out _)
|
||||
? Convert.ToInt64($"{IP.Replace(".", "")}{Port}")
|
||||
: $"{IP.Replace(".", "")}{Port}".GetStableHashCode();
|
||||
public long EndPoint => IPAddress.TryParse(ListenAddress, out _)
|
||||
? Convert.ToInt64($"{ListenAddress!.Replace(".", "")}{ListenPort}")
|
||||
: $"{ListenAddress!.Replace(".", "")}{ListenPort}".GetStableHashCode();
|
||||
|
||||
public long LegacyEndpoint => EndPoint;
|
||||
|
||||
public abstract long LegacyDatabaseId { get; }
|
||||
public string Id => $"{ListenAddress}:{ListenPort}";
|
||||
|
||||
// Objects
|
||||
public IManager Manager { get; protected set; }
|
||||
@ -142,6 +147,8 @@ namespace SharedLibraryCore
|
||||
/// </summary>
|
||||
public string IP { get; protected set; }
|
||||
|
||||
public string ListenAddress => IP;
|
||||
|
||||
public IPEndPoint ResolvedIpEndPoint { get; protected set; }
|
||||
public string Version { get; protected set; }
|
||||
public bool IsInitialized { get; set; }
|
||||
@ -391,7 +398,7 @@ namespace SharedLibraryCore
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{IP}:{Port}";
|
||||
return $"{ListenAddress}:{ListenPort}";
|
||||
}
|
||||
|
||||
protected async Task<bool> ScriptLoaded()
|
||||
|
@ -1242,7 +1242,7 @@ namespace SharedLibraryCore
|
||||
|
||||
var serverConfig = appConfig.Servers?
|
||||
.FirstOrDefault(configServer =>
|
||||
configServer.IPAddress == server.IP && configServer.Port == server.Port);
|
||||
configServer.IPAddress == server.ListenAddress && configServer.Port == server.ListenPort);
|
||||
|
||||
var allRules = appConfig.GlobalRules?.ToList() ?? new List<string>();
|
||||
if (serverConfig?.Rules != null)
|
||||
|
Reference in New Issue
Block a user