(f87bfac85) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -35,6 +35,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
public bool CompareTo(string ipCompare)
|
||||
{
|
||||
if (string.IsNullOrEmpty(IP)) { return false; }
|
||||
if (!IsRangeBan)
|
||||
{
|
||||
return ipCompare == IP;
|
||||
@@ -49,6 +50,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
public bool CompareTo(IPAddress ipCompare)
|
||||
{
|
||||
if (string.IsNullOrEmpty(IP)) { return false; }
|
||||
if (ipCompare.IsIPv4MappedToIPv6 && CompareTo(ipCompare.MapToIPv4().ToString()))
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -93,6 +93,10 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
name = name.Replace(":", "");
|
||||
name = name.Replace(";", "");
|
||||
if (name.Length > NetConfig.ServerNameMaxLength)
|
||||
{
|
||||
name = name.Substring(0, NetConfig.ServerNameMaxLength);
|
||||
}
|
||||
|
||||
this.name = name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user