PtokaX forum

Archive => Archived 5.1 boards => Request for scripts => Topic started by: sphinx_spb on 27 July, 2007, 15:42:07

Title: Restriction script
Post by: sphinx_spb on 27 July, 2007, 15:42:07
Can I ask a script or somewhat for this: enter hub is free, but for download user must share 5G, and for search 8G (for example). I saw this on one Verlihub. Is this possible with Ptokax?
Title: Re: Restriction script
Post by: Mr.T on 13 August, 2007, 17:24:11
where in the scrip can i change to 50gb share limit  :)
i have find it lol :)
Title: Re: Restriction script
Post by: sphinx_spb on 18 August, 2007, 16:10:31
Hi, Mutor! Big thanks for the script! But...

[10:56] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[10:59] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[11:12] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[13:14] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[15:25] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[16:36] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)


I have no idea why this error occurs...
Maybe wrong pattern

local s,e,search = string.find(data,"([^%?]+)|$")

(string 85)
Title: Re: Restriction script
Post by: bastya_elvtars on 18 August, 2007, 22:24:02
Quote from: sphinx_spb on 18 August, 2007, 16:10:31

[10:56] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[10:59] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[11:12] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[13:14] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[15:25] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)
[16:36] Syntax C:\ptokax\scripts\Shareres.lua:87: attempt to concatenate local 'search' (a nil value)


local s,e,search = string.find(data,"([^%?]+)|$")

I don't get it. What is this line supposed to do, Sir?
Title: Re: Restriction script
Post by: sphinx_spb on 19 August, 2007, 15:36:47
Well, script is working fine. But this error is occurs sometimes, as you see.
I think, this line is pattern for users' search requests, doesn't it?
Title: Re: Restriction script
Post by: bastya_elvtars on 19 August, 2007, 15:42:14
The question was targeted at Mutor. :)
In fact, I really do not get what that code should do, why no active and passive search requests are handled separately etc.
Title: Re: Restriction script
Post by: sphinx_spb on 21 August, 2007, 00:35:48
Тhanks for your effort, Mutor, i really appreciate it! :D
I will test the script now.
Title: Re: Restriction script
Post by: baba.runner on 21 August, 2007, 20:09:29
Hi Mutor

Thanks for this interesting Script.

The only issue I have with it , is that it does not kick a user when he tried a certain time to download or search, when he did not match the requirements. Perhaps it is due to the fact that I use also Leviathan, a all in one Script!
I found in your script the place where it sends the command to timeban I think it is user:timeban(..........
Can I change that to use a Leviathan command such as !drop or another command?

Thx for your help