Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Small problem
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2022-03-13 21:14:23
i have a small problem
i have 2xup and silver mod they work perfectly, but when i put on a torrent both of them i get double upload and normal upload. i tried diferent thinks nothink works. I think its from announce

if (($upthis > 0 || $downthis > 0 || $elapsed > 0) && is_valid_id($userid)){ // LIVE STATS!)
if ($torrent["freeleech"] == 1){
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `dload` = `dload` + '$downthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");

}
elseif ($torrent["doubleupload"] == 2){
//$upthis = ($upthis+$upthis);
SQL_Query_exec("UPDATE users SET uploaded = uploaded + ($upthis*2), downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis'*2, `dload` = `dload` + '$downthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");
}
if ($torrent["silver"] == 1){

SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + ($downthis/2) WHERE id=$userid") or err("Tracker error: Unable to update stats");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `dload` = `dload` + '$downthis'/2, `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");

}

  }


Thanks in advance
2022-03-14 17:00:02
I don't use these but you can try
if ($torrent["silver"] == 1){


Replace with
if ($torrent["silver"] == 1 && $torrent["doubleupload"] != 2){


This means if silver and not double upload run last two updates. If double upload ignore silver.

If silver is more important it would be something like on this line - it depends which is preferred
if ( $torrent["doubleupload"] == 2 && $torrent["silver"] != 1
){

Last edited by M-jay warn on 2022-03-15 15:21:23
2022-03-15 02:12:46
if (isset($torrent["silver"], $torrent["doubleupload"]) && intval($torrent["silver"]) == 1 && $torrent["doubleupload"] != 2)

Check properly. Check both keys and declare conditions.
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728