Eject a player from the server if they have 3+ invalid login attempts.
This commit is contained in:
parent
4e87ceb84f
commit
9d6cf29c4e
1 changed files with 7 additions and 0 deletions
|
|
@ -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]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue