PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: TTB on 12 January, 2005, 17:49:46

Title: [NULL] account leech blocker level VIP
Post by: TTB on 12 January, 2005, 17:49:46
Hi,

I'm looking for a script where users who have [NULL] prefix can't download from other users... they should have userlevel VIP.

So, if someone has this nickname [NULL]hi and is regged in the VIP userlevel, they can't download from other users.

Note that the normal [VIP] status can download from other users... (only [NULL] prefix can't).

Thanx
Title:
Post by: NightLitch on 12 January, 2005, 18:12:07
it is not hard to create, maybe someone will create it for you, Typhoon, Bastya, Hawk with others that maybe have little more time than me right now.

but an easy script is:

cMessage = "No Connection Message Here"

tData = {
["$Con"] = function(sUser,sData) return ConnectToMeArrival(sUser,sData) end, -- $ConnectToMe
["$Rev"] = function(sUser,sData) return RevConnectToMeArrival(sUser,sData) end, -- $RevConnectToMe
}

function DataArrival(sUser,sData)
if strsub(sData,1,1) == "$" then
local Str = strsub(sData,1,4)
if tData[Str] then
return tData[Str](sUser,sData)
end
end
end

function ConnectToMeArrival(sUser,sData)
if strfind(ConMe, "%[NULL%]") and sUser.iProfile == 2 then
SendToNick(sUser.sName, cMessage)
return 1
end
end

RevConnectToMeArrival = ConnectToMeArrival

Not tested.

took time on this 53sec.
Title:
Post by: TTB on 12 January, 2005, 18:29:55
53 seconds??

Damn... (I'm speechless)...


eh. I'm going to try thisone  :D    I will respond later of it works very well..

Thanx
Title:
Post by: TTB on 12 January, 2005, 22:05:48
Hi,

It doesn't work... I have tested it with a [NULL] account trying to download from users with userlevel -1 and 2. I can download by both of them.

Maybe you where a little to fast NightLitch? ;)  Can you fix it? Or someone else??

Thanx
Title:
Post by: NightLitch on 13 January, 2005, 11:21:27
try it now... haven't tried it but I noticed I had done it wrongly.
Title:
Post by: TTB on 13 January, 2005, 17:38:34
Hi,

Thanx for your reply... but it still doesn't work. I have tested it this time with connecting from [NULL] userlevel 2 to userlevel 0 (Master).

Thanx for your time but maybe you can try it again for me...  :D
Title:
Post by: NightLitch on 13 January, 2005, 17:52:08
QuoteOriginally posted by TTB
Hi,

Thanx for your reply... but it still doesn't work. I have tested it this time with connecting from [NULL] userlevel 2 to userlevel 0 (Master).

Thanx for your time but maybe you can try it again for me...  :D

lol

I think I need to try it the next time i'll rewrite it...

I just put something together...

Have som much to do right now... But I see what time I get over, no promises....
Title:
Post by: TTB on 13 January, 2005, 17:59:39
Thanx NL,

I just wait and see... like the other script  8)


Thanx for your time
Title:
Post by: TTB on 14 January, 2005, 01:12:58
Well... I have tried this code on my own! Have to start somewhere ;)

It is the code from Chill, and modified by me. Maybe other users are interested, so that's why I paste this.

Yes NightLitch... if you read this, I have spent 6 hours to make this script working in the way I like. But it is hard to start sometimes, but I do have now what I was looking for!

The code:

--100% Blocker by chill
--MODIFIED BY TTB (prefix blocker)

function Main()
frmHub:EnableFullData(1)
end

BlockTriggs = {
["$Rev"] = 1,
["$Con"] = 2,
}

function DataArrival(curUser,data)
if strsub(data,1,1) == "$" then
local str1 = strsub(data,1,4)
if BlockTriggs[str1] then
if (strlen(curUser.sName) > 5 and strlower(strsub(curUser.sName,1,6)) == "[null]" and curUser.iProfile == 2) then
  curUser:SendData("*** You are not authorized to download.")
  return 1
elseif BlockTriggs[str1] == 1 then
local _,_,conNick = strfind(data,"(%S+)|$")
if (strlen(conNick) > 5) and strlower(strsub(conNick,1,6)) == "[null]" then
curUser:SendData("*** The user you are trying to download from is not authorized to upload.")
return 1
end
elseif BlockTriggs[str1] == 2 then
local _,_,conNick = strfind(strsub(data,14,strlen(data)),"^(%S+)")
if (strlen(conNick) > 5) and strlower(strsub(conNick,1,6)) == "[null]" then
curUser:SendData("*** The user you are trying to download from is not authorized to upload.")
return 1
end
end
end
end
end
Title:
Post by: TTB on 18 January, 2005, 02:39:06
Hi,

I have a question. This script blocks all uploads and downloads if the user has prefix [NULL] and userl. ==2. But is it also possible that OTHER users can't see with the search function what he shares? Can that be blocked?  ?(   Please let me know...   :]
Title:
Post by: bastya_elvtars on 18 January, 2005, 02:47:14
if his / her uploads are blocked, the filelist cannot be dled from them either. but they response to searches, which cannot be controlled 100% serverside (AFAIK).
Title:
Post by: TTB on 18 January, 2005, 02:51:56
Thanx for your reply bastya_elvtars,

So the only option would be to let them share nothing = 0 mb...?!

Thanx
Title:
Post by: bastya_elvtars on 18 January, 2005, 03:30:39
if you want 1000% blocking: yes

otherwise they can still respond active search results afaik