mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 11:27:24 +08:00
update the criteria for becoming a cheater
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user