huge commit for advanced stats feature.

broke data out into its own library.
may be breaking changes with existing plugins
This commit is contained in:
RaidMax
2021-03-22 11:09:25 -05:00
parent db2e1deb2f
commit c5375b661b
505 changed files with 13671 additions and 3271 deletions

View File

@ -2,6 +2,7 @@
using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Interfaces;
using System.Threading.Tasks;
using Data.Models;
namespace SharedLibraryCore.Commands
{

View File

@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Data.Models;
namespace SharedLibraryCore.Commands
{

View File

@ -1,6 +1,5 @@
using Microsoft.EntityFrameworkCore;
using SharedLibraryCore.Configuration;
using SharedLibraryCore.Database;
using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Helpers;
using SharedLibraryCore.Interfaces;
@ -12,9 +11,11 @@ using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Data.Abstractions;
using Data.Models;
using Microsoft.Extensions.Logging;
using Serilog.Context;
using static SharedLibraryCore.Database.Models.EFClient;
using static Data.Models.Client.EFClient;
namespace SharedLibraryCore.Commands
{
@ -1474,6 +1475,7 @@ namespace SharedLibraryCore.Commands
inactiveUsers = await context.Clients
.Where(c => c.Level > Permission.Flagged && c.Level <= Permission.Moderator)
.Where(c => c.LastConnection < lastActive)
.Select(c => c.ToPartialClient())
.ToListAsync();
inactiveUsers.ForEach(c => c.SetLevel(Permission.User, E.Origin));
await context.SaveChangesAsync();

View File

@ -2,6 +2,7 @@
using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Interfaces;
using System.Threading.Tasks;
using Data.Models;
namespace SharedLibraryCore.Commands
{

View File

@ -3,6 +3,7 @@ using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Interfaces;
using System.Linq;
using System.Threading.Tasks;
using Data.Models;
namespace SharedLibraryCore.Commands
{

View File

@ -3,6 +3,7 @@ using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Interfaces;
using System.Linq;
using System.Threading.Tasks;
using Data.Models;
namespace SharedLibraryCore.Commands
{