aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-11 10:28:16 -0500
committerMichael <[email protected]>2017-03-11 10:28:16 -0500
commit01420ff329ab1819f1be1ea444c46785328b44cb (patch)
tree1766c39afd9e1c61dcc1fb5b2411e195fb0446de /ShiftOS_TheReturn
parentdad61e325cfcd1ce12ae6f29d3778d1c919c6ab3 (diff)
downloadshiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.tar.gz
shiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.tar.bz2
shiftos_thereturn-01420ff329ab1819f1be1ea444c46785328b44cb.zip
fix mud.connect deadlock
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/Commands.cs2
-rw-r--r--ShiftOS_TheReturn/ServerManager.cs2
-rw-r--r--ShiftOS_TheReturn/TerminalBackend.cs61
3 files changed, 36 insertions, 29 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index 12c371f..7e517c1 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -156,6 +156,8 @@ namespace ShiftOS.Engine
{
Console.WriteLine("{ERROR}: " + ex.Message);
}
+
+ TerminalBackend.PrefixEnabled = false;
return true;
}
catch (Exception ex)
diff --git a/ShiftOS_TheReturn/ServerManager.cs b/ShiftOS_TheReturn/ServerManager.cs
index 4d599cd..31b3129 100644
--- a/ShiftOS_TheReturn/ServerManager.cs
+++ b/ShiftOS_TheReturn/ServerManager.cs
@@ -125,6 +125,8 @@ namespace ShiftOS.Engine
{
thisGuid = new Guid(msg.Contents);
GUIDReceived?.Invoke(msg.Contents);
+ TerminalBackend.PrefixEnabled = true;
+ TerminalBackend.PrintPrompt();
}
else if(msg.Name == "allusers")
{
diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs
index c7852f1..e4bad33 100644
--- a/ShiftOS_TheReturn/TerminalBackend.cs
+++ b/ShiftOS_TheReturn/TerminalBackend.cs
@@ -339,35 +339,38 @@ namespace ShiftOS.Engine
public static void PrintPrompt()
{
- ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
- ConsoleEx.Italic = false;
- ConsoleEx.Underline = false;
-
- ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
- ConsoleEx.Bold = true;
-
- Console.Write(SaveSystem.CurrentSave.Username);
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = ConsoleColor.Gray;
- Console.Write("@");
- ConsoleEx.Italic = true;
- ConsoleEx.Bold = true;
- ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
- Console.Write(SaveSystem.CurrentSave.SystemName);
- ConsoleEx.Italic = false;
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = ConsoleColor.Gray;
- Console.Write(":~");
- Console.ForegroundColor = ConsoleColor.White;
- ConsoleEx.Italic = true;
- if (KernelWatchdog.InKernelMode == true)
- Console.Write("#");
- else
- Console.Write("$");
- ConsoleEx.Italic = false;
- ConsoleEx.Bold = false;
- ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
- Console.Write(" ");
+ if (SaveSystem.CurrentSave != null)
+ {
+ ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
+ ConsoleEx.Italic = false;
+ ConsoleEx.Underline = false;
+
+ ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
+ ConsoleEx.Bold = true;
+
+ Console.Write(SaveSystem.CurrentSave.Username);
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = ConsoleColor.Gray;
+ Console.Write("@");
+ ConsoleEx.Italic = true;
+ ConsoleEx.Bold = true;
+ ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
+ Console.Write(SaveSystem.CurrentSave.SystemName);
+ ConsoleEx.Italic = false;
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = ConsoleColor.Gray;
+ Console.Write(":~");
+ Console.ForegroundColor = ConsoleColor.White;
+ ConsoleEx.Italic = true;
+ if (KernelWatchdog.InKernelMode == true)
+ Console.Write("#");
+ else
+ Console.Write("$");
+ ConsoleEx.Italic = false;
+ ConsoleEx.Bold = false;
+ ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
+ Console.Write(" ");
+ }
}