Register command no longer has a username param.

Password checking fixed.
This commit is contained in:
Zidonuke 2011-12-29 00:14:57 -05:00
parent 8523df9308
commit 1671db928b
2 changed files with 12 additions and 18 deletions

View file

@ -303,18 +303,14 @@ namespace TShockAPI
args.Player.PlayerData.CopyInventory(args.Player);
TShock.InventoryDB.InsertPlayerData(args.Player);
args.Player.SendMessage("Authenticated as " + args.Player + " successfully.", Color.LimeGreen);
Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user: " + args.Player);
return true;
}
else
{
TShock.Utils.ForceKick(args.Player, "Incorrect Account Password, use the password you created with /register");
args.Player.SendMessage("Authenticated as " + args.Player.Name + " successfully.", Color.LimeGreen);
Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user: " + args.Player.Name);
return true;
}
TShock.Utils.ForceKick(args.Player, "Incorrect User Account Password");
return true;
}
else if (!string.IsNullOrEmpty(TShock.Config.ServerPassword))
if (!string.IsNullOrEmpty(TShock.Config.ServerPassword))
{
if(TShock.Config.ServerPassword == password)
{
@ -324,11 +320,8 @@ namespace TShockAPI
NetMessage.SendData((int)PacketTypes.WorldInfo, args.Player.Index);
return true;
}
else
{
TShock.Utils.ForceKick(args.Player, "Incorrect Server Password");
return true;
}
TShock.Utils.ForceKick(args.Player, "Incorrect Server Password");
return true;
}
TShock.Utils.ForceKick(args.Player, "Bad Password Attempt");