i wanna know if there is somo kind of script that can block an user to make downloads, if he hasn't the minimum share, or minimum upload slots. i wanna let them enter the hub, to explain them how to share and put the slots, cause i'm from portugal, and somo users in my country don't understand english, so it's difficult to configure dc++. is there somo script like this? thnks
Try this one:
--$Rev Blocker by jiten
--restriction for those who have less than MinSlots and MinShare
--some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 500*mb -- in MBs
MinSlots = 3
function DoShareUnits(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then
sUnits = tUnits[index];
break;
else
intSize = intSize / 1024;
end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
function ConnectToMeArrival(curUser,data)
if curUser.iShareSize < MinShare or curUser.iSlots < MinSlots then
curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots.." slots open to be able do download.")
return 1
end
end
RevConnectToMeArrival = ConnectToMeArrival
Cheers
--$Rev Blocker by jiten
--restriction for those who have less than MinSlots and MinShare
--some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 500*mb -- in MBs
MinSlots = 3
function DoShareUnits(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then
sUnits = tUnits[index];
break;
else
intSize = intSize / 1024;
end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
function ConnectToMeArrival(curUser,data)
if curUser.iShareSize < MinShare or curUser.iSlots < MinSlots then
curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots.." slots open to be able do download.")
return 1
end
end
RevConnectToMeArrival = ConnectToMeArrival
local str1 = string.sub(data,1,4)
if BlockTriggs[str1] then
^^ this is not needed anymore with the new ptokax API
maybe this line is what you need RevConnectToMeArrival = ConnectToMeArrival
- Optimus
Thanks for the hint ;)
yw jiten
thank you very much. :)
yw :]
PS: First post updated with Optimus' hint.
Hello jiten,
can u add check Hubcount?
And if the User in More he will also blocked?
Here you go:
--$Rev Blocker by jiten
--restriction for MinSlots, MinShare and MaxHubs
--some ideas taken from leech bot and ShaveShare v4.8 by Herodes
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif curUser.iHubs > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
RevConnectToMeArrival = ConnectToMeArrival
Best regards
Seems to work perfekt. Thank you ;-)
Hi
is it possible to change the first script from Jiten that the message "You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots" will send via pm to every user and not be shown in the mainchat?
QuoteOriginally posted by James
Hi
is it possible to change the first script from Jiten that the message "You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots" will send via pm to every user and not be shown in the mainchat?
Just replace:
curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots.." slots open to be able do download.")
with:
curUser:SendPM(frmHub:GetHubBotName(),"*** You have to share at least "..DoShareUnits(MinShare).." and/or have "..MinSlots.." slots open to be able do download.")
Cheers
Thanks Jiten
...but have this now :
Private message from PtokaX:
*** You have to share at least 5.0 GB and/or have 2 slots open to be able do download.
This is in MainChat.
is it possible to have this in separate PM windows ?
QuoteOriginally posted by James
Thanks Jiten
...but have this now :
Private message from PtokaX: *** You have to share at least 5.0 GB and/or have 2 slots open to be able do download.
This is in MainChat.
is it possible to have this in separate PM windows ?
Have you ticked "Popup messages from users that are not online" and unticked "Ignore messages from users that are not online" in File - Settings - Advanced ? Or, is that bot registered?
Cheers
yes...now works:D:D:D
Thanks for helping.
i have another beg:
Is it possible to change the script for it could make exeptions for RegUser and Ops? It is cause of Sharesize and number of slots.
Thanks for your awaiting help,
greets James
Give this a try:
--$Rev Blocker by jiten
-- restriction for MinSlots, MinShare and MaxHubs
-- Added: Immune Table for Non-Operators
-- some ideas taken from leech bot and ShaveShare v4.8 by Herodes
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
tImmune = { ["nick1"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if not tImmune[curUser.sName] or not curUser.bOperator then
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif curUser.iHubs > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
end
RevConnectToMeArrival = ConnectToMeArrival
Cheers
Hi
have this Script end DownloadBloker works ,but Immune User works not... (have PtokaX-16.05...maybe is this my Problem)
--$Rev Blocker by jiten
--restriction for those who have less than MinSlots and MinShare
--Added: Immune Table for Non-Operators
--some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 5120*mb -- in MBs
MinSlots = 2
tImmune = { ["EL_DIABLO"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
function DoShareUnits(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then
sUnits = tUnits[index];
break;
else
intSize = intSize / 1024;
end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
function ConnectToMeArrival(curUser,data)
if curUser.iShareSize < MinShare or curUser.iSlots < MinSlots then
curUser:SendPM(frmHub:GetHubBotName(),"*** Sorry , Du musst "..DoShareUnits(MinShare).." und "..MinSlots.." offene slots haben um downloaden zu k?nnen.")
return 1
end
end
RevConnectToMeArrival = ConnectToMeArrival
QuoteOriginally posted by James
Hi
have this Script end DownloadBloker works ,but Immune User works not... (have PtokaX-16.05...maybe is this my Problem)
why it doesn't work is because you didn't copy the whole script in that jiten posted in his last post.
QuoteOriginally posted by blackwings
QuoteOriginally posted by James
Hi
have this Script end DownloadBloker works ,but Immune User works not... (have PtokaX-16.05...maybe is this my Problem)
why it doesn't work is because you didn't copy the whole script in that jiten posted in his last post.
Indeed, there are some parts he didn't copy.
That's why it isn't working.
Best regards
well I use the full script (the last one by jiten) and the download blocker works but immune doesn't. Could it be that the script needs a part with userprofiles? Like 1 for Ops, 2 for regs, 3 for user and so on ????
--$Rev Blocker by jiten
-- restriction for MinSlots, MinShare and MaxHubs
-- Added: Immune Table for Non-Operators
-- some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
tImmune = { ["EL_DIABLO"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if not tImmune[curUser.sName] or not curUser.bOperator then
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif curUser.iHubs > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
end
RevConnectToMeArrival = ConnectToMeArrival
QuoteOriginally posted by James
well I use the full script (the last one by jiten) and the download blocker works but immune doesn't. Could it be that the script needs a part with userprofiles? Like 1 for Ops, 2 for regs, 3 for user and so on ????
no, this script only check people who isn't a op or have a username in the immune list. I don't really see why the immunelist doesn't work.
this shouldn't make a difference, but try this =
--$Rev Blocker by jiten
-- restriction for MinSlots, MinShare and MaxHubs
-- Added: Immune Table for Non-Operators
-- some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
tImmune = { ["EL_DIABLO"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if not curUser.bOperator then
if not tImmune[curUser.sName] then
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif curUser.iHubs > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
end
end
RevConnectToMeArrival = ConnectToMeArrival
Yes Blackwings :D:D:D
now works...
Very Thanks to : Jiten @ Blackwings
greets James
Hi
Is possible this. 1/1/1 User and vip cont for max hubs, but Operator no count. Insert this in the script for me please.
Tanks :)
[code]
--$Rev Blocker by jiten
-- restriction for MinSlots, MinShare and MaxHubs
-- Added: Immune Table for Non-Operators
-- some ideas taken from leech bot and ShaveShare v4.8 by Herodes
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
tImmune = { ["nick1"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if not tImmune[curUser.sName] or not curUser.bOperator then
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif curUser.iHubs > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
end
RevConnectToMeArrival = ConnectToMeArrival
[\CODE]
[][][] Genius
Give this a try:
--$Rev Blocker by jiten
-- restriction for MinSlots, MinShare and MaxHubs
-- Added: Immune Table for Non-Operators
-- Changed: Normal and Reg Hub Check
-- some ideas taken from leech bot and ShaveShare v4.8 by Herodes
kb = 1024
mb = 1024 ^ 2
gb = 1024 ^ 3
MinShare = 500*mb -- in MBs
MinSlots = 3
MaxHubs = 5
tImmune = { ["EL_DIABLO"] = 1, ["nick2"] = 1, } -- Non-Operators Immune List (["nick"] = 1)
DoShareUnits = function(intSize) --- Thanks to kepp and NotRambitWombat
if intSize ~= 0 then
local tUnits = { "Bytes", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
local sUnits;
for index = 1, table.getn(tUnits) do
if(intSize < 1024) then sUnits = tUnits[index]; break; else intSize = intSize / 1024; end
end
return string.format("%0.1f %s",intSize, sUnits);
else
return "nothing"
end
end
ConnectToMeArrival = function(curUser,data)
if not curUser.bOperator then
if not tImmune[curUser.sName] then
if curUser.iShareSize < MinShare then
return curUser:SendData("*** You have to share at least "..DoShareUnits(MinShare).." to be able to download."),1
elseif curUser.iSlots < MinSlots then
return curUser:SendData("*** You must have "..MinSlots.." open slots to be able do download."),1
elseif (curUser.iNormalHubs + curUser.iRegHubs) > MaxHubs then
return curUser:SendData("*** You can't be in more than "..MaxHubs.." hubs to be able do download."),1
end
end
end
end
RevConnectToMeArrival = ConnectToMeArrival
Regards,
jiten
Sorry guys, is it me or is it still allowed downloads even with 0 mbs of share ?
I've tested.
Btw, is it possible to extend a not alowed profile also to the search's use ?
Cyaaaa [[[]]