diff --git a/lang/cht/lang_staffpanel.php b/lang/cht/lang_staffpanel.php index 36379b4a..39541384 100644 --- a/lang/cht/lang_staffpanel.php +++ b/lang/cht/lang_staffpanel.php @@ -73,6 +73,7 @@ $lang_staffpanel = [ 'Manage custom fields' => '管理自定義的字段', 'Search user' => '搜索用戶', 'Confirm user' => '確認用戶', + 'Confirm user to complete registration' => '確認用戶以完成注冊', 'Add Attendance card' => '增加補簽卡', 'Add Attendance card to certain classes' => '為特定等級用戶增加補簽卡', 'Add Bonus/Attend card/Invite/upload' => '增加魔力/補簽卡/邀請/上傳量', diff --git a/public/announce.php b/public/announce.php index d248d9dc..4a88aa30 100644 --- a/public/announce.php +++ b/public/announce.php @@ -193,6 +193,13 @@ if ($torrent['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW && } } +if ($left > $torrent['size']) { + //disable download + (new \App\Repositories\UserRepository())->updateDownloadPrivileges(null, $userid, 'no', 'fake_announce'); + do_log(sprintf("fake announce, user: %s, torrent: %s, announce left: %s > size: %s", $userid, $torrentid, $left, $torrent['size']), 'warn'); + warn("fake announce"); +} + // select peers info from peers table for this torrent $numpeers = $torrent["seeders"]+$torrent["leechers"]; diff --git a/resources/lang/en/message.php b/resources/lang/en/message.php index 19092603..320ad9ff 100644 --- a/resources/lang/en/message.php +++ b/resources/lang/en/message.php @@ -23,6 +23,10 @@ return [ 'subject' => 'Download permission canceled', 'body' => 'Your download permission has been cancelled due to announce to paid torrent too many times, please make sure you have enough bonus.' , ], + 'download_disable_fake_announce' => [ + 'subject' => 'Download permission canceled', + 'body' => 'Your download permission has been cancelled due to announce fake data.', + ], 'download_enable' => [ 'subject' => 'Download permission restored', 'body' => 'Your download privileges restored, you can now download torrents. By: :operator', diff --git a/resources/lang/zh_CN/message.php b/resources/lang/zh_CN/message.php index b2c19bea..94aab8d3 100644 --- a/resources/lang/zh_CN/message.php +++ b/resources/lang/zh_CN/message.php @@ -23,6 +23,10 @@ return [ 'subject' => '下载权限取消', 'body' => '你因向付费种子汇报失败次数过多下载权限被取消,请确保你有足够的魔力。', ], + 'download_disable_fake_announce' => [ + 'subject' => '下载权限取消', + 'body' => '你因虚假汇报下载权限被取消。', + ], 'download_enable' => [ 'subject' => '下载权限恢复', 'body' => '你的下载权限恢复,你现在可以下载种子。By: :operator', diff --git a/resources/lang/zh_TW/message.php b/resources/lang/zh_TW/message.php index 044e91af..44fb4a14 100644 --- a/resources/lang/zh_TW/message.php +++ b/resources/lang/zh_TW/message.php @@ -22,6 +22,10 @@ return [ 'subject' => '下载权限取消', 'body' => '你因向付費種子匯報失敗次數過多下載權限被取消,請確保你有足夠的魔力。', ], + 'download_disable_fake_announce' => [ + 'subject' => '下载权限取消', + 'body' => '你因虛假匯報下載權限被取消。', + ], 'download_enable' => [ 'subject' => '下載權限恢復', 'body' => '你的下載權限恢復,你現在可以下載種子。By: :operator',