Skip to content

Commit

Permalink
Allow disabling auto name verification for LAN IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed May 18, 2024
1 parent b77da60 commit 151b75a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MCGalaxy/Server/Authentication/LoginAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public abstract class LoginAuthenticator
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);
}
}

Expand Down
2 changes: 2 additions & 0 deletions MCGalaxy/Server/ServerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ public sealed class ServerConfig : EnvConfig
public List<string> DisabledModules = new List<string>();
[ConfigTimespan("death-invulnerability-cooldown", "Other", 2, false)]
public TimeSpan DeathCooldown = TimeSpan.FromSeconds(2);
[ConfigBool("verify-lan-ips", "Other", false)]
public bool VerifyLanIPs = false;

[ConfigBool("irc", "IRC bot", false)]
public bool UseIRC = false;
Expand Down

0 comments on commit 151b75a

Please sign in to comment.