-1 Maximum login attempts to disable.

This commit is contained in:
Lucas Nicodemus 2011-07-01 03:08:10 -06:00
parent c6b77970c8
commit e57ab38e4b

View file

@ -290,7 +290,7 @@ namespace TShockAPI
public static void AttemptLogin(CommandArgs args)
{
if (args.Player.LoginAttempts > ConfigurationManager.MaximumLoginAttempts)
if (args.Player.LoginAttempts > ConfigurationManager.MaximumLoginAttempts && (ConfigurationManager.MaximumLoginAttempts != -1))
{
Log.Warn(args.Player.IP + "(" + args.Player.Name + ") had " + ConfigurationManager.MaximumLoginAttempts + " or more invalid login attempts and was kicked automatically.");
Tools.Kick(args.Player, "Too many invalid login attempts.");