fix: Fixes console clobbering when prompted to add an owner account (#2133)
### Summary - Updates AccountPrompt to use `logger` to avoid console clobbering ### Screenshot 
This commit is contained in:
parent
0265e0673a
commit
b8a8bfd1a9
1 changed files with 4 additions and 7 deletions
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using Server.Accounting;
|
||||
using Server.Logging;
|
||||
|
||||
|
|
@ -12,18 +11,16 @@ public static class AccountPrompt
|
|||
{
|
||||
if (Accounts.Count == 0)
|
||||
{
|
||||
Console.WriteLine("This server has no accounts.");
|
||||
Console.Write("Do you want to create the owner account now? (y/n): ");
|
||||
logger.Warning("This server has no accounts.");
|
||||
logger.Information("Do you want to create the owner account now? (y/n):");
|
||||
|
||||
var answer = ConsoleInputHandler.ReadLine();
|
||||
if (answer.InsensitiveEquals("y"))
|
||||
{
|
||||
Console.WriteLine();
|
||||
|
||||
Console.Write("Username: ");
|
||||
logger.Information("Input Username:");
|
||||
var username = ConsoleInputHandler.ReadLine();
|
||||
|
||||
Console.Write("Password: ");
|
||||
logger.Information("Input Password:");
|
||||
var password = ConsoleInputHandler.ReadLine();
|
||||
|
||||
var a = new Account(username, password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue