Implemented config for disabling account login at join.

This commit is contained in:
Zidonuke 2011-12-29 00:32:12 -05:00
parent 1671db928b
commit be20d07707
2 changed files with 4 additions and 1 deletions

View file

@ -215,6 +215,9 @@ namespace TShockAPI
[Description("Protect chests with region and build permissions")]
public bool RegionProtectChests = false;
[Description("Disable users from being able to login with account password when joining")]
public bool DisableLoginBeforeJoin = false;
public static ConfigFile Read(string path)
{

View file

@ -246,7 +246,7 @@ namespace TShockAPI
private static bool HandleConnecting(GetDataHandlerArgs args)
{
var user = TShock.Users.GetUserByName(args.Player.Name);
if (user != null)
if (user != null && !TShock.Config.DisableLoginBeforeJoin)
{
args.Player.RequiresPassword = true;
NetMessage.SendData((int)PacketTypes.PasswordRequired, args.Player.Index);