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:
@ -2,6 +2,7 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
|
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -2,6 +2,7 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
|
@ -3,6 +3,7 @@ using SharedLibraryCore.Database.Models;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Models;
|
||||
|
||||
namespace SharedLibraryCore.Commands
|
||||
{
|
||||
|
Reference in New Issue
Block a user