A messege to CHILLER and all users. the script below works great inconjunction with RC7a and 326+330.
Thanks C
Quotefrom Chiller"gate you are my tester it seemd to work but dunno check for yourself."
code:--------------------------------------------------------------------------------
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** You must get registered to be able to download from an OP")
return 1
end
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if GetItemByName(towho) and GetItemByName(towho).bOperator then
curUser:SendData("*** You must get registered to be able to download from an OP")
return 1
end
end
end
--------------------------------------------------------------------------------
looks good to me, but i think u should add a blocknoprofile option...so when users with no profiles tri to download they are completly blocked =]
Hi,
Maybe i am sleepy here but this "curUser.iProfile == -1" already does that.
Best regards, nErBoS
Hello m8,
is that script only to prevent users of downloading from OPs!?
Regards
possible this wil work for blocking download to everyone if a user is not registerd (not tested yet)
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(curUser, data)
if (strsub(data, 1, 15) == "$RevConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$RevConnectToMe%s+%S+%s+(%S+)|")
if GetItemByName(towho) then
curUser:SendData("*** You must get registered to be able to download")
return 1
end
elseif (strsub(data, 1, 12) == "$ConnectToMe" and curUser.iProfile == -1) then
local _,_,towho = strfind(data, "$ConnectToMe%s+(%S+)%s+.*|")
if GetItemByName(towho) then
curUser:SendData("*** You must get registered to be able to download")
return 1
end
end
end
see this page for more info about this download blocker: http://board.univ-angers.fr/thread.php?threadid=249&boardid=12&styleid=1&sid=fe3b919428d6fb78dea2847c24f3b574
//ZeroX
//edit: little bit edit, before a user can download from also users who are unregged
Thx m8,
I will test it. I?ll let you know if not. :)
Regards
i use this "goodoldscript" ...
wich laso prevents the non regged user from searching in the hub..
--------------------CODE--------------------------------------
--ChatOnlyVar2.lua by Romulus 2003-09-14
--
--Script to prevent searching and downloading from non-registered users
--Tested with PtokaX TD4
botname="-=MembersOnly=-"
AllowSearch=0 -- If you change this value to 1 searches are possible
AllowDownload=0 -- If you change this value to 1 downloads are possible
function Main()
frmHub:EnableFullData(1)
end
function DataArrival(user, data)
data=strsub(data,1,strlen(data)-1)
if user.iProfile==-1 then
if AllowSearch~=1 then
if strsub(data,1,7)=="$Search" then
user:SendData(botname,"You are not allowed to search for files. Only registered users may search!... .. .. you can type -> ?reg <- to find out how to do so.")
return 1 end
end
if AllowDownload~=1 then
if strsub(data,1,12)=="$ConnectToMe" then
user:SendData(botname,"You are not allowed to download files. Only registered users may download! . .. .so type -> ?reg <- to find out how")
return 1 end
if strsub(data,1,15)=="$RevConnectToMe" then
user:SendData(botname,"You are not allowed to download files. Only registered users may download! .. . .. type -> ?reg <- and you will see how to .. ")
return 1 end
end
end end
--------------------- End of Code -----------------------------
one problem though ..
if the non-regged users gets granted a slot by another user.. he/she can download from them anyway..
( the same goes for that script above )
so i also use .. this little gimmick -- Made by nErBoS
--------------------- CODE ---------------------
-- Made by nErBoS
sBot = "anti-slotbeg&blablabla-come-to-my-hub-bot"
function DataArrival(user, data)
if(strsub(data,1,5) == "$To: ") then
local s,e,who = strfind(data, "$To:%s+(%S+)%s+From:")
if user.iProfile == -1 then
if(GetItemByName(who) ~= nil and not GetItemByName(who).bOperator) then
user:SendPM(sBot, "You are not regged you can only PM OPs... Complaints ?? . . . . Go and blame D.J.Valium!")
return 1
end
end
end
end
--------------------- End of Code -----------------------------
hope this helps ..
p.s. please can someone teach me how to do this script thing to keep the Tabs lined out in the post because i see them when i write/paste them in this litlle box here .. but they don't show in the post .. :0(
does those scripts even work??.. get syntax errors and nil value warnings when i trie to run them :( .....
go here to see the original codes
and the real 100% blocker.
http://board.univ-angers.fr/thread.php?threadid=249&boardid=12&styleid=1&sid=1904f05fc6c46f590760c7c5d3eba4b7&page=3