Here goes quick hack for ya: in index.cgi findgembels wrote:Hi,
A lot of our users back in Indonesia problem on limitation Max bandwidth last X day(s) settings, can we do limitation only on username only not IP's ? Because a lot of my user using Internet cafe's or university and they use same IP. The problem when you limit b/w on IP's its causing our premium its limited as well.
So I hope developer can help us to disabled limitation on IP Premium user.
Code: Select all
#my $cond = $ses->getUser ? "usr_id=".$ses->getUserId : "ip=INET_ATON('".$ses->getIP."')";
my $bw = $db->SelectOne("SELECT SUM(size) FROM IP2Files WHERE ip=INET_ATON(?) AND created > NOW()-INTERVAL ? DAY",$ses->getIP,$c->{bw_limit_days});
Code: Select all
my $bw = $db->SelectOne("SELECT SUM(size) FROM IP2Files WHERE $cond AND created > NOW()-INTERVAL ? DAY",$ses->getIP,$c->{bw_limit_days});