mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-11 08:18:49 -07:00
change report checks (i really need to find a better way to do this)
This commit is contained in:
parent
299b9cc0ca
commit
35a120bee9
@ -228,20 +228,20 @@ public class AuthenticationController : Controller {
|
||||
|
||||
foreach(var report in reportsType1)
|
||||
{
|
||||
if (DateTime.Compare(report.CreatedAt, DateTime.UtcNow) < 0) i1++;
|
||||
if (DateTime.Compare(DateTime.UtcNow, report.CreatedAt) > 0) i1++;
|
||||
}
|
||||
|
||||
foreach(var report in reportsType2)
|
||||
{
|
||||
if (DateTime.Compare(report.CreatedAt, DateTime.UtcNow) < 0) i2++;
|
||||
if (DateTime.Compare(DateTime.UtcNow, report.CreatedAt) > 0) i2++;
|
||||
}
|
||||
|
||||
foreach(var report in reportsType3)
|
||||
{
|
||||
if (DateTime.Compare(report.CreatedAt, DateTime.UtcNow) < 0) i3++;
|
||||
if (DateTime.Compare(DateTime.UtcNow, report.CreatedAt) > 0) i3++;
|
||||
}
|
||||
|
||||
if (i1 > 3 || i2 > 3 || i3 > 3)
|
||||
if (i1 >= 3 || i2 >= 3 || i3 >= 3)
|
||||
{
|
||||
// add a one week ban to the user, clear report history, and disallow login
|
||||
moderationService.AddBanToUser(viking.User, UserBanType.TemporarySuspension, DateTime.UtcNow.AddDays(7));
|
||||
|
Loading…
x
Reference in New Issue
Block a user