diff --git a/Commons.cs b/Commons.cs index 46c6129..f800d10 100644 --- a/Commons.cs +++ b/Commons.cs @@ -139,12 +139,13 @@ internal static class Commons Console.Write(" Caching User Accounts... "); await using SqlConnection FConn = new(CS); await FConn.OpenAsync().ConfigureAwait(false); - using SqlCommand FComm = new("SELECT * FROM users",FConn); + using SqlCommand FComm = new("SELECT * FROM useraccounts",FConn); await using (SqlDataReader URead = await FComm.ExecuteReaderAsync(CTS.Token).ConfigureAwait(false)) { - while(await URead.ReadAsync(CTS.Token).ConfigureAwait(false)) + UserAccounts.Clear(); + while (await URead.ReadAsync(CTS.Token).ConfigureAwait(false)) { - _ = UserAccounts.TryAdd((string)URead["uname"], new User((string)URead["uname"],(string)URead["name"],(string)URead["pass"],(byte)URead["level"],(bool)URead["active"])); + _ = UserAccounts.TryAdd((string)URead["uname"], new User((string)URead["uname"], (string)URead["agentid"], (string)URead["pass"], (byte)URead["level"], (bool)URead["active"])); } } Console.WriteLine("Done.");