Move all TShock usages to use User.VerifyPassword()

This commit is contained in:
Lucas Nicodemus 2015-04-13 11:16:21 -06:00
parent bbf6fd2c86
commit 37b5a52fdb
5 changed files with 10 additions and 11 deletions

View file

@ -1512,8 +1512,7 @@ namespace TShockAPI
var user = TShock.Users.GetUserByName(args.Player.Name);
if (user != null && !TShock.Config.DisableLoginBeforeJoin)
{
string encrPass = TShock.Utils.HashPassword(password);
if (user.Password.ToUpper() == encrPass.ToUpper())
if (user.VerifyPassword(password))
{
args.Player.RequiresPassword = false;
args.Player.PlayerData = TShock.CharacterDB.GetPlayerData(args.Player, TShock.Users.GetUserID(args.Player.Name));