mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-01 09:37:03 +02:00
16 lines
412 B
C#
16 lines
412 B
C#
namespace Robust.Shared.Configuration;
|
|
|
|
internal static class ConfigHelpers
|
|
{
|
|
public static int GetEffectiveMaxConnections(this IConfigurationManager cfg)
|
|
{
|
|
#pragma warning disable CS0618
|
|
var maxPlayers = cfg.GetCVar(CVars.GameMaxPlayers);
|
|
#pragma warning restore CS0618
|
|
if (maxPlayers != 0)
|
|
return maxPlayers;
|
|
|
|
return cfg.GetCVar(CVars.NetMaxConnections);
|
|
}
|
|
}
|