Added password obfuscation while typing

Each character of the password is replaced by a star while typing
+ Fixed an old typo for "Handshake successfull" (ss -> cc).
This commit is contained in:
ORelio 2013-08-23 10:48:26 +02:00
parent f26ff323fd
commit f7835e7f60
3 changed files with 47 additions and 6 deletions

View file

@ -157,13 +157,12 @@ namespace MinecraftClient
if (Settings.Password == "")
{
Console.Write(ConsoleIO.basicIO ? "Please type the password for " + Settings.Login + ".\n" : "Password : ");
Settings.Password = Console.ReadLine();
Settings.Password = ConsoleIO.basicIO ? Console.ReadLine() : ConsoleIO.ReadPassword();
if (Settings.Password == "") { Settings.Password = "-"; }
if (!ConsoleIO.basicIO)
{
//Hide the password
Console.CursorTop--;
Console.Write("Password : <******>");
//Hide password length
Console.CursorTop--; Console.Write("Password : <******>");
for (int i = 19; i < Console.BufferWidth; i++) { Console.Write(' '); }
}
}