From cf96526911308cd5695c24e57d4386866820a8b8 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 4 Jul 2021 20:51:11 +0200 Subject: [PATCH] =?UTF-8?q?keine=20macht=20dem=20kapitalismus;=20passw?= =?UTF-8?q?=C3=B6rter=20darf=20man=20jetzt=20kostenlos=20=C3=A4ndern=20:^)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Commands/UserCommands.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index ffc9acaf..a89185bc 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -22,7 +22,6 @@ namespace ReallifeGamemode.Server.Commands { private static readonly ILogger logger = LogManager.GetLogger(); - private const int PASSWORD_CHANGE_FEE = 5000; private const int SMS_PRICE = 5; [Command("rent", "~m~rent stop")] @@ -135,12 +134,6 @@ namespace ReallifeGamemode.Server.Commands DatabaseContext dbContext = new DatabaseContext(); User user = player.GetUser(dbContext); - if (user.BankAccount.Balance < PASSWORD_CHANGE_FEE) - { - ChatService.ErrorMessage(player, $"Für eine Passwortänderung benötigst du mindestens { PASSWORD_CHANGE_FEE.ToMoneyString() }"); - return; - } - if (user.Password != NAPI.Util.GetHashSha256(oldPassword)) { ChatService.ErrorMessage(player, "Du hast dein aktuelles Passwort falsch eingegeben"); @@ -148,11 +141,10 @@ namespace ReallifeGamemode.Server.Commands } user.Password = NAPI.Util.GetHashSha256(newPassword); - user.BankAccount.Balance -= PASSWORD_CHANGE_FEE; dbContext.SaveChanges(); - ChatService.SendMessage(player, $"~y~[ACCOUNT] ~s~Du hast dein Passwort erfolgreich geändert. Dir wurden ~y~{ PASSWORD_CHANGE_FEE.ToMoneyString() } ~s~in Rechnung gestellt."); - logger.LogInformation("Player {0} changed their password for {1}", player.Name, PASSWORD_CHANGE_FEE.ToMoneyString()); + ChatService.SendMessage(player, $"~y~[ACCOUNT] ~s~Du hast dein Passwort erfolgreich geändert."); + logger.LogInformation("Player {0} changed their password", player.Name); } [Command("sms", "~m~Benutzung: ~s~/sms [Spieler] [Nachricht]", GreedyArg = true)]