update the criteria for becoming a cheater

This commit is contained in:
xiaomlove
2022-02-21 16:21:50 +08:00
parent 7409e90875
commit 9ceb9ec4d1
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -72,11 +72,11 @@ class User extends Authenticatable
public static $cardTitles = [
'uploaded_human' => '上传',
'downloaded_human' => '下载',
// 'share_ratio' => '分享率',
'share_ratio' => '分享率',
// 'seed_time' => '做种时间',
'seed_bonus' => '魔力值',
'seed_points' => '做种积分',
// 'invites' => '邀请',
'invites' => '邀请',
];
public function getClassTextAttribute(): string
+2 -2
View File
@@ -68,8 +68,8 @@ function check_cheater($userid, $torrentid, $uploaded, $downloaded, $anctime, $s
$time = date("Y-m-d H:i:s");
$upspeed = ($uploaded > 0 ? $uploaded / $anctime : 0);
$mustBeCheaterSpeed = 1024 * 1024 * 100; //100 MB/s
$mayBeCheaterSpeed = 1024 * 1024 * 50; //50 MB/s
$mustBeCheaterSpeed = 1024 * 1024 * 1000; //1000 MB/s
$mayBeCheaterSpeed = 1024 * 1024 * 100; //100 MB/s
if ($uploaded > 1073741824 && $upspeed > ($mustBeCheaterSpeed/$cheaterdet_security)) //Uploaded more than 1 GB with uploading rate higher than 100 MByte/S (For Consertive level). This is no doubt cheating.
{
+1 -1
View File
@@ -38,7 +38,7 @@ begin_main_frame("", true);
print $filterForm;
$rescount = \App\Models\HitAndRun::query()->where('status', $status)->count();
$rescount = \App\Models\HitAndRun::query()->where('uid', $userid)->where('status', $status)->count();
list($pagertop, $pagerbottom, $limit, $offset, $pageSize) = pager(50, $rescount, "?status=$status");
print("<table width='100%'>");
print("<tr>