Eject a player from the server if they have 3+ invalid login attempts.

This commit is contained in:
Lucas Nicodemus 2011-07-01 03:02:10 -06:00
parent 4e87ceb84f
commit 9d6cf29c4e

View file

@ -289,6 +289,13 @@ namespace TShockAPI
public static void AttemptLogin(CommandArgs args)
{
if (args.Player.LoginAttempts > 3)
{
Log.Warn(args.Player.IP + "(" + args.Player.Name + ") was had 3 or more invalid login attempts and was kicked automatically.");
Tools.Kick(args.Player, "Too many invalid login attempts.");
}
if (args.Parameters.Count != 2)
{
args.Player.SendMessage("Syntax: /login [username] [password]");