Attempting a work around for DNS host resolution. There will now be a configuration parameter that will enable the check. This is expensive, and not recommended, but a better reserved slot system will be done in the future.
Closes #254
This commit is contained in:
parent
d6c1f44219
commit
407d327236
3 changed files with 41 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ namespace TShockAPI
|
|||
public class TShock : TerrariaPlugin
|
||||
{
|
||||
public static readonly Version VersionNum = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
public static readonly string VersionCodename = "The Deathly Database Part 2";
|
||||
public static readonly string VersionCodename = "Codename: Re";
|
||||
|
||||
public static string SavePath = "tshock";
|
||||
|
||||
|
|
@ -376,8 +376,13 @@ namespace TShockAPI
|
|||
private void OnJoin(int ply, HandledEventArgs handler)
|
||||
{
|
||||
var player = new TSPlayer(ply);
|
||||
|
||||
player.Group = TShock.Users.GetGroupForIP(player.IP);
|
||||
if (Config.EnableDNSHostResolution)
|
||||
{
|
||||
player.Group = TShock.Users.GetGroupForIPExpensive(player.IP);
|
||||
} else
|
||||
{
|
||||
player.Group = TShock.Users.GetGroupForIP(player.IP);
|
||||
}
|
||||
|
||||
if (Tools.ActivePlayers() + 1 > TShock.Config.MaxSlots && !player.Group.HasPermission("reservedslot"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue