Subscribe

Gold (free-leech)

  1. 2010-08-21 09:55:55 PDT
    DB xbt_files Add `gold` int(1) NOT NULL DEFAULT '0' 1. File: /Tracker/server.h After: ===================================================== seeders = 0; ===================================================== Add: ===================================================== gold = 0; ===================================================== After: ===================================================== int seeders; ===================================================== Add: ===================================================== int gold; ===================================================== 2. File: /Tracker/server.cpp Before: ===================================================== m_files_users_updates_buffer += Csql_query(m_database, "(?,1,?,?,?,?,?,?,?),") ===================================================== Add: ===================================================== if (file.gold == 1) downloaded = 0; ===================================================== Search: ===================================================== Csql_result result = Csql_query(m_database, "select info_hash, @completed, @fid, ctime from @files where @fid >= ?").p(m_fid_end).execute(); ===================================================== Replace: ===================================================== Csql_result result = Csql_query(m_database, "select info_hash, @completed, @fid, ctime, gold from @files where @fid >= ?").p(m_fid_end).execute(); ===================================================== After: ===================================================== file.ctime = row[3].i(); ===================================================== Add: ===================================================== file.gold = row[4].i(); ===================================================== help make the correct function Free-Leech
  2. 2010-09-30 17:06:12 PDT
    That's correct but only the new torrent will be 'free' you need to check the old torrents if the 'gold' status changed. Here is my idea: in table xbt_files use the flags column for check when you get the new torrents from the database, get the torrents where flags = 2 then update the file.gold parameter in xbt in your frontend you only need to set the gold column to 1 and the flags column to 2 then xbt re-reads that row from database and update the values. Get luck with it. if you cant do it, ask olaf he has a patch for goldtorrents but that is nonfree i think.
  3. 2010-10-01 00:10:25 PDT
    now done so - a separate script fetches from xbt_files fid where gold = 1, then in xbt_files_users fetches all uid with fid and puts downloaded=0 and takes value in xbt_users downloaded, it's not very convenient, as this script should be placed on the crowns every minute, or 5 minutes I would like that to this treatment was carried out by xbtt
  4. 2010-10-01 00:17:54 PDT
    on PHP it's like this: $arr_tr = $db->query("SELECT fid FROM xbt_files WHERE gold='1'"); while ($arr_t = $db->get_row($arr_tr)) { $z = $db->query( "SELECT uid,downloaded FROM xbt_files_users WHERE fid='{$arr_t['fid']}' AND downloaded>'0'" ); while ($r = $db->get_row($z)) { $db->query("UPDATE xbt_users SET downloaded=downloaded-{$r['downloaded']} WHERE uid='".$r["uid"]."'"); $db->query("UPDATE xbt_files_users SET downloaded='0' WHERE uid='".$r["uid"]."' AND fid='{$arr_t['fid']}'"); } }
  5. 2010-10-01 00:27:41 PDT
    on php for me it just, but that's a C++ is problematic, because I do not know C++ to such an extent as php ... on this and ask for help from those who know C++
  6. 2011-01-09 11:31:36 PST
    is it working?
  7. 2011-01-13 05:50:37 PST
    Working version 1. File: 1. File: /Tracker/server.h After: bool dirty; Add: //****** Gold *** start ******// bool gold; //****** Gold *** stop ******// 2. File: /Tracker/server.cpp Find: downloaded = v.m_downloaded - i->downloaded; Replace: downloaded = file.gold ? 0 : v.m_downloaded - i->downloaded; Csql_result result = Csql_query(m_database, "select info_hash, @fid from @files where flags & 1").execute(); for (Csql_row row; row = result.fetch_row(); ) { t_files::iterator i = m_files.find(row[0].s()); if (i != m_files.end()) { BOOST_FOREACH(t_peers::reference j, i->second.peers) { if (t_user* user = find_user_by_uid(j.second.uid)) (j.second.left ? user->incompletes : user->completes)--; } m_files.erase(i); } Csql_query(m_database, "delete from @files where @fid = ?").p(row[1].i()).execute(); } Add: //****** Gold *** start ******// result = Csql_query(m_database, "select info_hash, @fid, gold from @files where flags & 2").execute(); for (Csql_row row; row = result.fetch_row(); ) { t_files::iterator i = m_files.find(row[0].s()); if (i != m_files.end()) { i->second.gold = row[2].i(); } Csql_query(m_database, "update @files set flags = flags & ~2 where @fid = ?").p(row[1].i()).execute(); } //****** Gold *** stop ******// Find: Csql_result result = Csql_query(m_database, "select info_hash, @completed, @fid, ctime from @files where @fid >= ?").p(m_fid_end).execute(); Replace: Csql_result result = Csql_query(m_database, "select info_hash, @completed, @fid, ctime, gold from @files where @fid >= ?").p(m_fid_end).execute(); After: file.ctime = row[3].i(); Add: //****** Gold *** start ******// file.gold = row[4].i(); //****** Gold *** stop ******// In table files add colum gold to make the distribution of gold: update table files set flags=2 and gold=1
  8. 2011-01-13 05:53:20 PST
    For 35 euro one can also buy the multipliers mod that allows free leech, double upload and more.
  9. 2011-01-13 05:58:21 PST
    can you detail that much more?
  10. 2011-01-13 05:59:21 PST
    It's sold by me, payment via PayPal. Anything else?
  11. 2011-01-13 06:01:26 PST
    I'm interested in this functional module.
  12. 2011-01-13 06:02:42 PST
    if it is necessary to me the function is ready to buy your modifications
  13. 2011-01-13 06:03:16 PST
    Mailto: olafvdspek@gmail.com
  14. 2011-03-13 19:31:16 PDT
    Can the multiplier be used to provide freeleech for only for certain usergroups in a particular forum?
  15. 2011-03-14 03:37:08 PDT
    Yes, it can.
  16. 2011-03-24 20:29:36 PDT
    thanks for the quick reply Olaf :)...multiplier works either for usergroups or for forums but could not figure out how to use in a forum for only a certain usergroup.. do not want that usergroup to have freeleech in rest of the sections. any hint how to do it?
  17. 2011-03-25 02:10:35 PDT
    Ah, that can't be done with the current code.
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.