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