TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Mods & hacks Mods Complete & working Addon Mods Max Slots with Ratio and GBs

Max Slots with Ratio and GBs

2008-08-28 00:44:00
Group: Member
Posts: 68
Topics participated: 49
Topics started: 4
First post: 2008-08-18 00:30:00
Last post: 2008-09-10 09:16:00
This is better than the other one because you do not need SQL or cleanup for this

first in global.php
add
function maxslots () {
 
2008-08-28 00:56:00
Group: Member
Posts: 1701
Topics participated: 760
Topics started: 199
First post: 2007-04-06 23:17:00
Last post: 2009-01-04 00:36:00
Fatal error: Call to undefined function: maxslots() in /home/clock/public_html/include/bittorrent.php on line 1370


what i get when adding to bittorrent doh!! guess i didnt add the function in global
question will this mess up my other max torrents mod??
because i have this in my announce

//////////////MAX TORRENTS WITH USERCLASSES/////////////////
if ($az["class"] == UC_USER) $max = 2;
elseif ($az["class"] == UC_POWER_USER) $max = 3;
elseif ($az["class"] == UC_VIP) $max = 5;
elseif ($az["class"] == UC_UPLOADER) $max = 6;
elseif ($az["class"] == UC_MODERATOR) $max = 7;
elseif ($az["class"] == UC_ADMINISTRATOR) $max = 7;
elseif ($az["class"] == UC_SYSOP) $max = 8;
else $max = 0;
if ($max > 0) {
$res = mysql_query("SELECT COUNT(*) AS num FROM peers WHERE userid='$userid' AND seeder='no'") or err("Tracker error 5");
$row = mysql_fetch_assoc($res);
if ($row['num'] >= $max) err("Not authorized (You are downloading your maximum number of allowed torrents - $max)");
}
/////////////END MAX TORRENTS WITH USERCLASSES//////////////
 
2008-08-28 13:07:00
Group: Member
Posts: 68
Topics participated: 49
Topics started: 4
First post: 2008-08-18 00:30:00
Last post: 2008-09-10 09:16:00
remove that mod and try this full code and remember it will show the limit for Under VIP class you cannot test it on your account ;)
 
2008-08-30 13:44:00
Group: Member
Posts: 14
Topics participated: 7
Topics started: 1
First post: 2008-01-31 22:01:00
Last post: 2008-08-30 13:44:00
thks nice work
 
2008-09-07 09:22:00
Group: Member
Posts: 2
Topics participated: 2
Topics started: 0
First post: 2008-09-07 09:22:00
Last post: 2008-09-16 10:14:00
screenshot please
Thanks!
 
2008-09-07 13:08:00
Group: Member
Posts: 847
Topics participated: 448
Topics started: 80
First post: 2008-01-26 11:33:00
Last post: 2009-01-01 20:14:00
and why would you need screen shot ?
 
2008-09-12 20:11:00
Group: Member
Posts: 6
Topics participated: 5
Topics started: 2
First post: 2008-02-28 17:00:00
Last post: 2008-12-06 16:11:00
Looks like a great addon mod.. however it didnt really work for me.

I set it up as shown but during testing I found that I could download as many torrents as I wanted while my profile showed me to have 2 slots!

Any help would be appreciated.
 
2008-09-12 20:19:00
Group: Member
Posts: 847
Topics participated: 448
Topics started: 80
First post: 2008-01-26 11:33:00
Last post: 2009-01-01 20:14:00
did you tested it as your own account of under VIP ?
 
2008-09-12 22:55:00
Group: Member
Posts: 6
Topics participated: 5
Topics started: 2
First post: 2008-02-28 17:00:00
Last post: 2008-12-06 16:11:00
I tested it with a user account.

I used different ratios while testing but I was still able to download more than the allocated slots.
 
2008-11-20 00:43:00
Group: Member
Posts: 351
Topics participated: 233
Topics started: 17
First post: 2006-06-06 17:18:00
Last post: 2008-12-28 14:00:00
alter the announce to this

if ($az["class"] < UC_VIP){
 

Similar threads

Topic Posts Last post
Max Slots 25 2008-10-20 20:00:00
Max Torrents Slots 5 2008-07-22 20:41:00
Max Slots Mod ?? 4 2007-11-28 16:11:00
torrent slots? 3 2006-05-08 15:53:00
slots system 1 2008-08-27 16:39:00