mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-06 23:39:02 +02:00
feat(announce): add VIP access check for announce request
This commit is contained in:
@@ -44,6 +44,7 @@ const FAILURE_REASONS = {
|
||||
170: 'your account is banned',
|
||||
171: 'your account is inactive',
|
||||
172: 'your client is not allowed, here is the blacklist: ' + config.meanTorrentConfig.announce.clientBlackListUrl,
|
||||
173: 'this torrent is only for VIP members',
|
||||
|
||||
180: 'You already are downloading the same torrent. You may only leech from one location at a time',
|
||||
181: 'You cannot seed the same torrent from more than 3 locations',
|
||||
@@ -255,6 +256,8 @@ exports.announce = function (req, res) {
|
||||
done(160);
|
||||
} else if (!t) {
|
||||
done(161);
|
||||
} else if (t.torrent_vip && !req.passkeyuser.isVip) {
|
||||
done(173);
|
||||
} else {
|
||||
req.torrent = t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user