PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: jay-dee on 14 March, 2006, 07:26:54

Title: fakekiller to share checker???
Post by: jay-dee on 14 March, 2006, 07:26:54
if its possible to change the opposite from fake killer to check if you share the files or get kicked???
---------------------------------------------------------------------------------------------------
-- Advanced BadFile Active Search // Stripped from Thor 6
-- By: NightLitch 2005-03-04
---------------------------------------------------------------------------------------------------
tBadFiles = {

{"explorer.scf" , "NO sharing of installed / packed programs or games"},
{".temp.mp3" , "NO sharing of incomplete downloads"},
{"_INCOMPLETE_" , "NO sharing of incomplete downloads"},
{"download123456789.dat" , "NO sharing of incomplete downloads"},
{"part.met" , "NO sharing of incomplete downloads"},
{".getright" , "NO sharing of incomplete downloads"},
{"autorun.inf" , "NO sharing of installed / packed programs or games"},
{"DCPlusPlus.exe" , "NO sharing of installed / packed programs or games"},
{"valve.avi" , "NO sharing of installed / packed programs or games"},
{"virscan .dat" , "NO sharing of installed / packed programs or games"},
{"Netlimiter" , "NO sharing of installed / packed programs or games"},
? ? ? ? {"preteen"? , Don't share Preteen porn, remove it!},

}
---------------------------------------------------------------------------------------------------
--// Don't Edit below this point if you don't now what you are doing
---------------------------------------------------------------------------------------------------

tTimer = {}

function Main()
RegTimer(SearchForBadFiles, 20 * 1000, "ActiveBadFileSearch")? -- Active Search Each 20 Sec
SetTimer(1000)
StartTimer()
end

function OnTimer()
for i=1,table.getn(tTimer) do
tTimer[i][3] = tTimer[i][3] + 1
if tTimer[i][3] > tTimer[i][2] then
tTimer[i][3]=1
tTimer[i][1]()
end
end
end

function SRArrival(sUser,sData)
local _,_,From,Path,FileSize,FreeSlots,TotalSlots,Who = string.find(sData, "^%$SR%s+(%S+)%s+(.*)(%d+)%s+(%d+)%/(%d+).*(%S+)%|$")
if tCall["BadFileSearch"] then pcall(tCall["BadFileSearch"],sUser,Path,Who,FileSize) end
end

tCall = {}
tCall["BadFileSearch"] = function(sUser,Path,Who,FileSize)
if sUser.bOperator then return 0 end
if Who == "SlotFetch" then
local FileFound, FileReason = BadFiles(Path)
if FileFound then
sUser:SendData(frmHub:GetHubBotName(), "*** You have been kicked for "..FileReason..". "..Path.." "..Units(FileSize))
SendToOps(frmHub:GetHubBotName(), "*** User "..sUser.sName.." has been kicked for "..FileReason..". "..Path.." "..Units(FileSize))
sUser:TempBan()
end
end
end

RegTimer = function(Function,Interval,str)
? ?local tmpTrig = Interval / 1000
? ?table.insert(tTimer,{Function,tmpTrig,1,str})
end

Units = function(intSize)
if tonumber(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 "0 Bytes"
end
end

BadFiles = function(PathStr)
for i = 1, table.getn(tBadFiles) do
if string.find(PathStr, tBadFiles[i][1]) then
return 1,tBadFiles[i][2]
end
end
return nil, "Other Files"
end

SearchForBadFiles = function()
if t == nil then
t =1
if tBadFiles[t] then
SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
end
elseif t > table.getn(tBadFiles) then
t = nil
else
t = t+1
if tBadFiles[t] then
SendToAll("$Search "..frmHub:GetHubIp()..":"..frmHub:GetHubUdpPort().." F?F?0?1?"..tBadFiles[t][1])
else
t = 0
end
end
end


like example... im a noob in this......

tBadFiles = {

{"vanquard" , "you must have the synth"},
{".VST" , "Its a must have"},
{"Stylus RMX, "this you need about proaudio"},


that the bot check if you have it all in it, if not you get kicked!? for special hubs, like movie hub or some audio appzhub.

and is it possible to create a minimum share for it all???

greetz jay
Title: Re: fakekiller to share checker???
Post by: jay-dee on 15 March, 2006, 09:50:53
so like the picture i can set a minimum of audio sources to have????


and whats the code for checking only the word:L example: *vst     or *vst*   or vst* that checks only on the word, not at the end or beginning, just checking the word

i heard that dcdm++ or zion++ opclients the adsl search but im very noob at that....i have the forbidden files, but who can make me a clean example to show the line what i must have, so i can build on that...

very thnx greetingzz  jay-dee

lua rockzzzzzzzzz!
Title: Re: fakekiller to share checker???
Post by: Northwind on 15 March, 2006, 15:24:23
DCDM++

Pothead's ADLsearch:
http://www.freetohost.co.uk/mike/ADLSearch.xml

Pothead's Raw commands:
http://www.freetohost.co.uk/mike/RawProfiles.xml

..and the latest DCDM++ SVN beta
http://www.freetohost.co.uk/mike/DCDM/dcdm-beta-svn.rar

Title: Re: fakekiller to share checker???
Post by: jay-dee on 16 March, 2006, 19:15:14
ok thats the forbidden files.....
but i search a raw script for must have files like

example:

<Search>
  <SearchString type="string">VST</SearchString>
  <SourceType type="string">Filename</SourceType>
  <DestDirectory type="string">Must have files</DestDirectory>
  <IsActive type="int">1</IsActive>
  <IsForbidden type="int">1</IsForbidden>
  <IsRegExp type="int">1</IsRegExp>
  <KickString type="string">$To: %[nick] From: %[mynick] $<%[mynick]> You must share pro audio software|<%[mynick]> !kick %[nick] no pro audio|</KickString>
  <AdlsPriority type="int">255</AdlsPriority>
  <MaxSize type="int64">15000000</MaxSize>
  <MinSize type="int64">15000000</MinSize>
  <SizeType type="string">B</SizeType>
  <AdlsComment type="string" />
  <IsCaseSensitive type="int">1</IsCaseSensitive>
  </Search>


cause im a noob at this, i hope i give the right search answer...   
Title: Re: fakekiller to share checker???
Post by: [NL]scooby on 24 June, 2006, 13:28:29
hello and i see that -> {"preteen"  , Don't share Preteen porn, remove it!},
and that have now -> {"preteen"  , "Don't share Preteen porn, remove it!"},
:D