komplexität verringert
This commit is contained in:
@@ -37,9 +37,9 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (user == null)
|
||||
{
|
||||
player.TriggerEvent("SERVER:Login_Error", "Der Benutzer existiert nicht! Registriere dich zuerst!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (user.SocialClubName != player.SocialClubName && user.Password == NAPI.Util.GetHashSha256(password))
|
||||
{
|
||||
player.TriggerEvent("SERVER:Login_Error", "Dieser Benutzer gehört dir nicht!");
|
||||
@@ -51,9 +51,9 @@ namespace ReallifeGamemode.Server.Events
|
||||
if (user.Password != NAPI.Util.GetHashSha256(password))
|
||||
{
|
||||
player.TriggerEvent("SERVER:Login_Error", "Passwort inkorrekt!");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
player.SetData("dbId", user.Id);
|
||||
player.Name = username;
|
||||
player.TriggerEvent("SERVER:Login_Success");
|
||||
@@ -149,6 +149,4 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user