From 5fe798589eb5f0c8906df337f14a5d6597dbadf3 Mon Sep 17 00:00:00 2001 From: lgb <353856593@qq.com> Date: Tue, 5 Sep 2023 15:48:21 +0800 Subject: [PATCH] improve system.max_upload_speed description --- include/constants.php | 2 +- public/announce.php | 10 +++++----- resources/lang/en/label.php | 2 +- resources/lang/zh_CN/label.php | 2 +- resources/lang/zh_TW/label.php | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/constants.php b/include/constants.php index a584af42..bfa9fdf2 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ get("$torrentNotExistsKey:$info_hash")) { $msg = "Torrent not exists"; do_log("[ANNOUNCE] $msg"); - warn($msg); + err($msg); } $torrentReAnnounceKey = sprintf('reAnnounceCheckByInfoHash:%s:%s', $userAuthenticateKey, $info_hash); if (!$isReAnnounce && !$redis->set($torrentReAnnounceKey, TIMENOW, ['nx', 'ex' => 60])) { @@ -215,7 +215,7 @@ if (!$torrent) { $infoHashUrlEncode = substr($queryString, $start, $end - $start); do_log("[TORRENT NOT EXISTS] $checkTorrentSql, params: $queryString, infoHashUrlEncode: $infoHashUrlEncode"); $redis->set("$torrentNotExistsKey:$info_hash", TIMENOW, ['ex' => 24*3600]); - warn("torrent not registered with this tracker"); + err("torrent not registered with this tracker"); } $GLOBALS['torrent'] = $torrent; $torrentid = $torrent["id"]; @@ -393,8 +393,8 @@ if (!isset($self)) warn("You cannot seed the same torrent in the same location from more than 1 client.", 300); } $valid = @mysql_fetch_row(@sql_query("SELECT COUNT(*) FROM peers WHERE torrent=$torrentid AND userid=" . sqlesc($userid))); - if ($valid[0] >= 1 && $seeder == 'no') warn("You already are downloading the same torrent. You may only leech from one location at a time.", 300); - if ($valid[0] >= 3 && $seeder == 'yes') warn("You cannot seed the same torrent from more than 3 locations.", 300); + if ($valid[0] >= 1 && $seeder == 'no') err("You already are downloading the same torrent. You may only leech from one location at a time.", 300); + if ($valid[0] >= 3 && $seeder == 'yes') err("You cannot seed the same torrent from more than 3 locations.", 300); if ($az["enabled"] == "no") warn("Your account is disabled!", 300); @@ -626,7 +626,7 @@ if (isset($self) && $event == "stopped") elseif(isset($self)) { $finished = $finished_snatched = ''; - if ($event == "completed" || (!empty($snatchInfo) && $left == 0 && $snatchInfo['finished'] != 'yes')) + if ($event == "completed") { //sql_query("UPDATE snatched SET finished = 'yes', completedat = $dt WHERE torrentid = $torrentid AND userid = $userid"); $finished .= ", finishedat = ".TIMENOW; diff --git a/resources/lang/en/label.php b/resources/lang/en/label.php index 5566176e..2a50ae15 100644 --- a/resources/lang/en/label.php +++ b/resources/lang/en/label.php @@ -101,7 +101,7 @@ return [ 'maximum_number_of_medals_can_be_worn' => 'Maximum number of medals that can be worn', 'cookie_valid_days' => 'Cookie Valid days', 'maximum_upload_speed' => 'Maximum upload speed', - 'maximum_upload_speed_help' => 'A single torrent upload speed exceeding this value is instantly disabled for the account, in Mbps. For example: 100 Mbps = 12.5 MB/s', + 'maximum_upload_speed_help' => 'This value affects cheater detection and is the speed limit for a conservative detection level. Actual Speed Limit = Maximum Upload Speed / Detection Level, from Conservative to Suspicious Levels 1 to 4. Therefore, if the Maximum Speed Limit is 1000, the detection level is Conservative with a Speed Limit of 1000/1 = 1000, and the detection level is Suspicious with a Speed Limit of 1000/4 = 250. A single upload speed that exceeds the actual limit will disable the account immediately, in Mbps. e.g.: 100 Mbps = 12.5 MB/s. Mbps. e.g. 100 Mbps = 12.5 MB/s.', 'is_invite_pre_email_and_username' => 'Invite whether to pre-book an email and username', 'is_invite_pre_email_and_username_help' => "Default: 'No'. If pre-booked, email and username may not be changed when the user registers.", 'access_admin_class_min' => 'Minimum class for logging into admin backend', diff --git a/resources/lang/zh_CN/label.php b/resources/lang/zh_CN/label.php index 59949b37..d21d67ff 100644 --- a/resources/lang/zh_CN/label.php +++ b/resources/lang/zh_CN/label.php @@ -101,7 +101,7 @@ return [ 'maximum_number_of_medals_can_be_worn' => '勋章最大可佩戴数', 'cookie_valid_days' => 'Cookie 有效天数', 'maximum_upload_speed' => '最大上传速度', - 'maximum_upload_speed_help' => '单种上传速度超过此值账号即刻禁用,单位 Mbps。如:100 Mbps = 12.5 MB/s', + 'maximum_upload_speed_help' => '此值影响作弊者检测,是检测级别保守的限速。实际限速 = 最大上传速度/检测级别,从保守~多疑级别为1~4。因此,假如最大限速为 1000,检测级别为保守时是限速 1000/1 = 1000,检测级别为多疑时是 1000/4=250。单种上传速度超过实际限速账号即刻禁用,单位 Mbps。如:100 Mbps = 12.5 MB/s。', 'is_invite_pre_email_and_username' => '邀请是否预定邮箱和用户名', 'is_invite_pre_email_and_username_help' => "默认: 'No'。若预定,用户注册时不可修改邮箱和用户名", 'access_admin_class_min' => '登录管理后台最小等级', diff --git a/resources/lang/zh_TW/label.php b/resources/lang/zh_TW/label.php index 5e92f96d..2e14bacd 100644 --- a/resources/lang/zh_TW/label.php +++ b/resources/lang/zh_TW/label.php @@ -101,7 +101,7 @@ return [ 'maximum_number_of_medals_can_be_worn' => '勛章最大可佩戴數', 'cookie_valid_days' => 'Cookie 有效天數', 'maximum_upload_speed' => '最大上傳速度', - 'maximum_upload_speed_help' => '單種上傳速度超過此值賬號即刻禁用,單位 Mbps。如:100 Mbps = 12.5 MB/s', + 'maximum_upload_speed_help' => '此值影響作弊者檢測,是檢測級別保守的限速。實際限速 = 最大上傳速度/檢測級別,從保守~多疑級別為1~4。因此,假如最大限速為 1000,檢測級別為保守時是限速 1000/1 = 1000,檢測級別為多疑時是 1000/4=250。單種上傳速度超過實際限速賬號即刻禁用,單位 Mbps。如:100 Mbps = 12.5 MB/s。', 'is_invite_pre_email_and_username' => '邀請是否預定郵箱和用戶名', 'is_invite_pre_email_and_username_help' => "默認: 'No'。若預定,用戶註冊時不可修改郵箱和用戶名", 'access_admin_class_min' => '登錄管理後臺最小等級',