fix: Adds better client verification (#853)
* Adds MinRequired and MaxRequired settings * Removes god client detection * Streamlines the kick messaging * Fixes detecting client version on mac/linux
This commit is contained in:
parent
fcc91cbd99
commit
1ac803e778
4 changed files with 158 additions and 113 deletions
|
|
@ -38,11 +38,11 @@ namespace Server
|
|||
|
||||
public static List<IPEndPoint> Listeners => m_Settings.Listeners;
|
||||
|
||||
public static string GetSetting(string key, string defaultValue)
|
||||
{
|
||||
m_Settings.Settings.TryGetValue(key, out var value);
|
||||
return value ?? defaultValue;
|
||||
}
|
||||
public static ClientVersion GetSetting(string key, ClientVersion defaultValue) =>
|
||||
m_Settings.Settings.TryGetValue(key, out var value) ? new ClientVersion(value) : defaultValue;
|
||||
|
||||
public static string GetSetting(string key, string defaultValue) =>
|
||||
m_Settings.Settings.TryGetValue(key, out var value) ? value : defaultValue;
|
||||
|
||||
public static int GetSetting(string key, int defaultValue)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue