aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilliam341 <[email protected]>2017-05-06 17:27:39 -0700
committerwilliam341 <[email protected]>2017-05-06 17:27:39 -0700
commit5fbf30dbc0350fe805686e4299604225f5bc4739 (patch)
tree5c1815437c56e159a273f4111b4e071b3fc537e1
parent1d4df69ee98427b6d9ad5175910de8b6b156284c (diff)
downloadshiftos_thereturn-5fbf30dbc0350fe805686e4299604225f5bc4739.tar.gz
shiftos_thereturn-5fbf30dbc0350fe805686e4299604225f5bc4739.tar.bz2
shiftos_thereturn-5fbf30dbc0350fe805686e4299604225f5bc4739.zip
fixed textlogin
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 1f2532a..e635a7a 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -307,9 +307,9 @@ namespace ShiftOS.Engine
{
string loginstr = CurrentSave.SystemName + " login: ";
string getuser = text.Remove(0, loginstr.Length);
- if (CurrentSave.Users.FirstOrDefault(x => x.Username == getuser) == null)
+ if (!string.IsNullOrWhiteSpace(getuser))
{
- if (CurrentSave.Users.FirstOrDefault(x => x.Username == text) == null)
+ if (CurrentSave.Users.FirstOrDefault(x => x.Username == getuser) == null)
{
Console.WriteLine("User not found.");
goback = true;
@@ -317,7 +317,7 @@ namespace ShiftOS.Engine
TerminalBackend.TextSent -= ev;
return;
}
- username = text;
+ username = getuser;
progress++;
}
else
@@ -327,13 +327,13 @@ namespace ShiftOS.Engine
goback = true;
progress++;
}
- username = getuser;
- progress++;
}
else if (progress == 1)
{
+ string passwordstr = "password: ";
+ string getpass = text.Remove(0, passwordstr.Length);
var user = CurrentSave.Users.FirstOrDefault(x => x.Username == username);
- if (user.Password == text)
+ if (user.Password == getpass)
{
Console.WriteLine("Welcome to ShiftOS.");
CurrentUser = user;