From 762cdb2daebd03696c70c699a5a64287fb05f510 Mon Sep 17 00:00:00 2001 From: lgb <353856593@qq.com> Date: Thu, 21 Sep 2023 12:32:51 +0800 Subject: [PATCH] hr only for leecher --- public/announce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/announce.php b/public/announce.php index a2029e7e..37b22896 100644 --- a/public/announce.php +++ b/public/announce.php @@ -607,7 +607,7 @@ else } //handle hr -if ($az['class'] < \App\Models\HitAndRun::MINIMUM_IGNORE_USER_CLASS && !$isDonor && isset($torrent['mode'])) { +if (($left > 0 || $event == "completed") && $az['class'] < \App\Models\HitAndRun::MINIMUM_IGNORE_USER_CLASS && !$isDonor && isset($torrent['mode'])) { $hrMode = \App\Models\HitAndRun::getConfig('mode', $torrent['mode']); $hrLog = sprintf("[HR_LOG] user: %d, torrent: %d, hrMode: %s", $userid, $torrentid, $hrMode); if ($hrMode == \App\Models\HitAndRun::MODE_GLOBAL || ($hrMode == \App\Models\HitAndRun::MODE_MANUAL && $torrent['hr'] == \App\Models\Torrent::HR_YES)) {