Allow disabling auto name verification for LAN IPs

This commit is contained in:
UnknownShadow200 2024-05-18 10:34:04 +10:00
parent b77da60b00
commit 151b75a351
2 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,7 @@ namespace MCGalaxy.Authentication
if (auth.Verify(p, mppass)) return true; if (auth.Verify(p, mppass)) return true;
} }
return !Server.Config.VerifyNames || IPUtil.IsPrivate(p.IP); return !Server.Config.VerifyNames || (IPUtil.IsPrivate(p.IP) && !Server.Config.VerifyLanIPs);
} }
} }

View File

@ -160,6 +160,8 @@ namespace MCGalaxy
public List<string> DisabledModules = new List<string>(); public List<string> DisabledModules = new List<string>();
[ConfigTimespan("death-invulnerability-cooldown", "Other", 2, false)] [ConfigTimespan("death-invulnerability-cooldown", "Other", 2, false)]
public TimeSpan DeathCooldown = TimeSpan.FromSeconds(2); public TimeSpan DeathCooldown = TimeSpan.FromSeconds(2);
[ConfigBool("verify-lan-ips", "Other", false)]
public bool VerifyLanIPs = false;
[ConfigBool("irc", "IRC bot", false)] [ConfigBool("irc", "IRC bot", false)]
public bool UseIRC = false; public bool UseIRC = false;