fix: Fixes console clobbering when prompted to add an owner account (#2133)

### Summary
- Updates AccountPrompt to use `logger` to avoid console clobbering

### Screenshot
![image](https://github.com/user-attachments/assets/8bfbaccc-3c23-4d05-ab49-a656e6a8803f)
This commit is contained in:
Voxpire 2025-02-27 02:43:20 +00:00 committed by GitHub
parent 0265e0673a
commit b8a8bfd1a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)