PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: mOrrI on 30 May, 2005, 21:48:07

Title: Can Someone put this script working in lua 5? [FileChecker]
Post by: mOrrI on 30 May, 2005, 21:48:07
Can Someone put this script working in lua 5????

thanks in advance...

-- vim:ts=4:sw=4:noet
-- FileChecker.lua, rewrite of a 'SearchKick' bot for PtokaX by ptaczek and
-- Leon (called The Illegalist)
-- version 1.0 for DCH++
-- by Sedulus 20030910, requested by BSOD2600
-- 20030919: 1.0
--
-- Translated back to PtokaX (OpiumVolage 9 Sept. 2003)
-- Added timer for automating search
--
-- (using more mem (3 tables, instead of one) but less cpu)
--
-- searches for all terms in the SearchFor table,
-- sends a message to the user that he/she shares the file, with the response
-- message.
-- set disconnectUser to 1 if you want the user disconnected as well (not
-- recommended, as bots always seem to find a way to misinterpret data ;) )
--
-- spaces in the SearchFor table will be converted to dollar's, but they will
-- (purposely) only match if there's a space in the result later.
-- so "a b" won't match "b a" or "aXXXb"

--// useful stuff
botName = "LAV-FileChecker?"
disconnectUser = nil -- disconnect the user, nil = don't
-- opchatName = "-TropiCo-" -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
opchatName = botName -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
mb = 1024 * 1024
gb = 1024 * mb
-- Timer value, will send search for 1 of the file on all users at each timer
timerValue = 10*1000 -- Every 10 seconds (higher value will reduce load)
useTimer = 1 -- set to 1 to enable timer functions
counter = 1
--// do not modify this table, lookup the meanings in the $Search section in the protocol documentation
SearchTypes = {
ANY = 1,
AUDIO = 2,
COMPRESSED = 3,
DOCUMENT = 4,
EXECUTABLE = 5,
IMAGE = 6,
VIDEO = 7,
FOLDER = 8, -- do not use FOLDER's! the $SR's are formatted differently
}

st = SearchTypes
--// MODIFY THIS TABLE <-------
--      { searchType, words[, minimumSize[, regexMatch]] }
SearchFor = {
["N?o tenhas no share porno destes tipos (pre)teen/incest/sick! L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.IMAGE, "preteen" },
{ st.VIDEO, "preteen" },
{ st.IMAGE, "incest" },
{ st.VIDEO, "incest" },
{ st.IMAGE, "underage" },
{ st.VIDEO, "underage" },
{ st.IMAGE, "teenage sex" },
{ st.VIDEO, "teenage sex" },
},
["N?o tenhas no share aplica??es instaladas e\ou aplica??es descomprimidas! L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "explorer.scf" },
{ st.ANY, "explore.ex_" },
{ st.ANY, "cd_clint.dll" },
{ st.EXECUTABLE, "express msimn.exe", 0, "express\\msimn%.exe$" },
{ st.EXECUTABLE, "IEXPLORE.EXE" },
{ st.ANY, "bfdist.vlu" },
{ st.ANY, "War3Inst.log" },
{ st.ANY, "ut2003.log" },
{ st.EXECUTABLE, "NFSHP2.exe" },
{ st.ANY, "avp2.rez" },
{ st.ANY, "ntuser.dat" },
{ st.EXECUTABLE, "winword.exe" },
{ st.ANY, "sav", 0, "%.sav$" },
{ st.ANY, "dll", 0, "%.dll$" },
{ st.ANY, "ex_", 0, "%.ex_$" },
{ st.EXECUTABLE, "setup.exe", 0, "\\setup%.exe$" },
},
["N?o tenhas downloads incompletos no share! L? as regras em http://www.lav-sounds.pt.vu Info: http://www.ownage.site.vu"] = {
{ st.ANY, "antifrag", 0, "antifrag$" },
{ st.ANY, "download dat", 0, "download[0-9]+%.dat$" },
{ st.ANY, "INCOMPLETE~" },
{ st.ANY, "__INCOMPLETE___" },
{ st.ANY, ".part.met"},
{ st.ANY, ".mp3.temp"},
{ st.ANY, " .torrent"},
},
["N?o ? premitido ter DVD's descomprimidos aqui! Remove todos os ficheiros VOB!  L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "VTS_01_0.VOB" },
},
["N?o tenhas no share ficheiros WAV! Obrigada pela aten??o, l? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.AUDIO, ".wav", 5*mb, "wav$" },
},
["Se tens no teu share copias de ficheiros s? para aumentar o share, estamos de olho em ti... l? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "copy of", 300*mb, "\\Copy of" },
{ st.ANY, "kopie van", 300*mb, "\\Kopie van" },
},
-- ["Please do not share unzipped DVD's and/or other large files. Use rar-sets."] = {
-- { st.ANY, ".", 1*gb },
-- },
}

--// convert the tables
SearchTable = {}
ResultTable = {}

function Main()
frmHub:EnableSearchData(1)
frmHub:RegBot(botName)
botLen = string.len( botName )
local i = 0 -- add the serial botnames in here as well.. so the user doesn't think he is flooded by one person
for k,v in SearchFor do
for _,search in v do
-- add $Search
local s = "$Search Hub:"..botName..i.." "
if search[3] then
s = s.."T?F?"..search[3]
else
s = s.."F?F?0"
end
s = s.."?"..search[1].."?"..string.gsub( search[2], " ", "$" ).."|"
table.insert( SearchTable, s )
-- add $SR match
local idx = string.lower( search[2] )
ResultTable[idx] = { msg = k }
if search[4] then ResultTable[idx].regex = string.lower( search[4] ) end
-- next..
i = i + 1
end
end
st, SearchTypes, SearchFor = nil, nil, nil

-- set options
if opchatName then
messageFunc = SendPmToOps
else
messageFunc = SendPmToOps
opchatName = botName
end
if useTimer then SetTimer(timerValue) StartTimer() end
end

-- on new user
function NewUserConnected( client )
table.foreachi(SearchTable, function(_, v) %client:SendData( v ) end)
end

-- on $SR
function DataArrival( client, line )
local match = nil
if string.sub( line, 1, 4 ) == "$SR " then
-- test if it was a result to us only
local ret,c,to = string.find( line, "\005([^\005|]*)|$" )
if ret and string.sub( to, 1, botLen ) == botName then
local ret,c,file,size = string.find( line, "^%$SR [^ ]+ ([^\005]*)\005([0-9]+) " )
if ret then
file = string.lower( file )
for k,v in ResultTable do
if ( v.regex and string.find( file, v.regex ) ) or ( not v.regex and string.find( file, k, 1, 1 ) ) then
match = 1
-- warn( client, file.." ("..dchpp.formatBytes( size ).." ("..size.."))", v.msg )
warn( client, file.." ("..size..")", v.msg )
end
end
end
end
end
-- disconnect user
if match and disconnectUser and not client.bOperator then
client:SendData( "<"..botName.."> Est?s a ser Kikado!" )
client:Disconnect()
return 1
end
end

function warn( client, file, response )
-- send message to user
client:SendData( "<"..botName.."> Tens no share o seguinte Ficheiro: "..file..": "..response )
if client.bOperator then return end
message = client.sName.." tem no share: "..file
-- send message to all Operators
messageFunc( opchatName, message )
end

function OnTimer()
if SearchTable.n < 1 then return end
SendToAll(SearchTable[counter])
counter = counter + 1
if counter > SearchTable.n then counter =1 end
end

Title:
Post by: ignazio on 30 May, 2005, 22:41:15
[22:37] Syntax ...ettings\IGNAZIO ZEUS\Desktop\0.3.3.0.b17.09.nt.dbg\scripts\file ceck.lua:144: unexpected symbol near `%'

hi boys me from error this writing and possible to correct the error?? ?(
Title:
Post by: GrinSlaW on 31 May, 2005, 00:02:21
try to remove the % on line 144


cheers  8)
Title:
Post by: mOrrI on 31 May, 2005, 00:56:23
Ok i changed that and i got no script errors but when i run it i  get this one:

Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:107: attempt to call method `EnableSearchData' (a nil value)

Title:
Post by: GrinSlaW on 31 May, 2005, 01:04:05
hmmm.....have you checked so the script you have is in LUA 5 and not in LUA 4 ? lua 4 will not work with  newest ptokax.

i have tried to convert it to LUA 5 and get the same error as you get dont know what to do i am not so good in lua yet  :]

cheers  8)
Title:
Post by: Madman on 31 May, 2005, 01:46:31
Remove frmHub:EnableSearchData(1)
and change
function DataArrival( client, line )
to
function SRArrival( client, line )
After that is should work fine...
Title:
Post by: mOrrI on 31 May, 2005, 21:46:01
ok i made those changes and the script runs...
but now gives me this running error??!?!

Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:185: attempt to compare nil with number
Title:
Post by: jiten on 31 May, 2005, 21:51:14
QuoteOriginally posted by mOrrI
ok i made those changes and the script runs...
but now gives me this running error??!?!

Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:185: attempt to compare nil with number
Can you copy that line, so we can have a look at it?
Title:
Post by: mOrrI on 31 May, 2005, 22:01:12
ok the changed script is here....
The line with error is maked in red :)

-- vim:ts=4:sw=4:noet
-- FileChecker.lua, rewrite of a 'SearchKick' bot for PtokaX by ptaczek and
-- Leon (called The Illegalist)
-- version 1.0 for DCH++
-- by Sedulus 20030910, requested by BSOD2600
-- 20030919: 1.0
--
-- Translated back to PtokaX (OpiumVolage 9 Sept. 2003)
-- Added timer for automating search
--
-- (using more mem (3 tables, instead of one) but less cpu)
--
-- searches for all terms in the SearchFor table,
-- sends a message to the user that he/she shares the file, with the response
-- message.
-- set disconnectUser to 1 if you want the user disconnected as well (not
-- recommended, as bots always seem to find a way to misinterpret data ;) )
--
-- spaces in the SearchFor table will be converted to dollar's, but they will
-- (purposely) only match if there's a space in the result later.
-- so "a b" won't match "b a" or "aXXXb"

--// useful stuff
botName = "LAV-FileChecker?"
disconnectUser = nil -- disconnect the user, nil = don't
-- opchatName = "-TropiCo-" -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
opchatName = botName -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
mb = 1024 * 1024
gb = 1024 * mb
-- Timer value, will send search for 1 of the file on all users at each timer
timerValue = 10*1000 -- Every 10 seconds (higher value will reduce load)
useTimer = 1 -- set to 1 to enable timer functions
counter = 1
--// do not modify this table, lookup the meanings in the $Search section in the protocol documentation
SearchTypes = {
ANY = 1,
AUDIO = 2,
COMPRESSED = 3,
DOCUMENT = 4,
EXECUTABLE = 5,
IMAGE = 6,
VIDEO = 7,
FOLDER = 8, -- do not use FOLDER's! the $SR's are formatted differently
}

st = SearchTypes
--// MODIFY THIS TABLE <-------
--      { searchType, words[, minimumSize[, regexMatch]] }
SearchFor = {
["N?o tenhas no share porno destes tipos (pre)teen/incest/sick! L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.IMAGE, "preteen" },
{ st.VIDEO, "preteen" },
{ st.IMAGE, "incest" },
{ st.VIDEO, "incest" },
{ st.IMAGE, "underage" },
{ st.VIDEO, "underage" },
{ st.IMAGE, "teenage sex" },
{ st.VIDEO, "teenage sex" },
},
["N?o tenhas no share aplica??es instaladas e\ou aplica??es descomprimidas! L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "explorer.scf" },
{ st.ANY, "explore.ex_" },
{ st.ANY, "cd_clint.dll" },
{ st.EXECUTABLE, "express msimn.exe", 0, "express\\msimn%.exe$" },
{ st.EXECUTABLE, "IEXPLORE.EXE" },
{ st.ANY, "bfdist.vlu" },
{ st.ANY, "War3Inst.log" },
{ st.ANY, "ut2003.log" },
{ st.EXECUTABLE, "NFSHP2.exe" },
{ st.ANY, "avp2.rez" },
{ st.ANY, "ntuser.dat" },
{ st.EXECUTABLE, "winword.exe" },
{ st.ANY, "sav", 0, "%.sav$" },
{ st.ANY, "dll", 0, "%.dll$" },
{ st.ANY, "ex_", 0, "%.ex_$" },
{ st.EXECUTABLE, "setup.exe", 0, "\\setup%.exe$" },
},
["N?o tenhas downloads incompletos no share! L? as regras em http://www.lav-sounds.pt.vu Info: http://www.ownage.site.vu"] = {
{ st.ANY, "antifrag", 0, "antifrag$" },
{ st.ANY, "download dat", 0, "download[0-9]+%.dat$" },
{ st.ANY, "INCOMPLETE~" },
{ st.ANY, "__INCOMPLETE___" },
{ st.ANY, ".part.met"},
{ st.ANY, ".mp3.temp"},
{ st.ANY, " .torrent"},
},
["N?o ? premitido ter DVD's descomprimidos aqui! Remove todos os ficheiros VOB!  L? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "VTS_01_0.VOB" },
},
["N?o tenhas no share ficheiros WAV! Obrigada pela aten??o, l? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.AUDIO, ".wav", 5*mb, "wav$" },
},
["Se tens no teu share copias de ficheiros s? para aumentar o share, estamos de olho em ti... l? as regras em http://www.lav-sounds.pt.vu ou Info: http://www.ownage.site.vu"] = {
{ st.ANY, "copy of", 300*mb, "\\Copy of" },
{ st.ANY, "kopie van", 300*mb, "\\Kopie van" },
},
-- ["Please do not share unzipped DVD's and/or other large files. Use rar-sets."] = {
-- { st.ANY, ".", 1*gb },
-- },
}

--// convert the tables
SearchTable = {}
ResultTable = {}

function Main()
--frmHub:EnableSearchData(1)
frmHub:RegBot(botName)
botLen = string.len( botName )
local i = 0 -- add the serial botnames in here as well.. so the user doesn't think he is flooded by one person
for k,v in SearchFor do
for _,search in v do
-- add $Search
local s = "$Search Hub:"..botName..i.." "
if search[3] then
s = s.."T?F?"..search[3]
else
s = s.."F?F?0"
end
s = s.."?"..search[1].."?"..string.gsub( search[2], " ", "$" ).."|"
table.insert( SearchTable, s )
-- add $SR match
local idx = string.lower( search[2] )
ResultTable[idx] = { msg = k }
if search[4] then ResultTable[idx].regex = string.lower( search[4] ) end
-- next..
i = i + 1
end
end
st, SearchTypes, SearchFor = nil, nil, nil

-- set options
if opchatName then
messageFunc = SendPmToOps
else
messageFunc = SendPmToOps
opchatName = botName
end
if useTimer then SetTimer(timerValue) StartTimer() end
end

-- on new user
function NewUserConnected( client )
table.foreachi(SearchTable, function(_, v) client:SendData( v ) end)
end

-- on $SR
function SRArrival( client, line )
local match = nil
if string.sub( line, 1, 4 ) == "$SR " then
-- test if it was a result to us only
local ret,c,to = string.find( line, "\005([^\005|]*)|$" )
if ret and string.sub( to, 1, botLen ) == botName then
local ret,c,file,size = string.find( line, "^%$SR [^ ]+ ([^\005]*)\005([0-9]+) " )
if ret then
file = string.lower( file )
for k,v in ResultTable do
if ( v.regex and string.find( file, v.regex ) ) or ( not v.regex and string.find( file, k, 1, 1 ) ) then
match = 1
-- warn( client, file.." ("..dchpp.formatBytes( size ).." ("..size.."))", v.msg )
warn( client, file.." ("..size..")", v.msg )
end
end
end
end
end
-- disconnect user
if match and disconnectUser and not client.bOperator then
client:SendData( "<"..botName.."> Est?s a ser Kikado!" )
client:Disconnect()
return 1
end
end

function warn( client, file, response )
-- send message to user
client:SendData( "<"..botName.."> Tens no share o seguinte Ficheiro: "..file..": "..response )
if client.bOperator then return end
message = client.sName.." tem no share: "..file
-- send message to all Operators
messageFunc( opchatName, message )
end

function OnTimer()
[color=red][b] if SearchTable.n < 1 then return end[/b][/color]
SendToAll(SearchTable[counter])
counter = counter + 1
if counter > SearchTable.n then counter =1 end
end
Title:
Post by: jiten on 31 May, 2005, 22:32:49
This a a really fast one and not tested:
-- vim:ts=4:sw=4:noet
-- FileChecker.lua, rewrite of a 'SearchKick' bot for PtokaX by ptaczek and
-- Leon (called The Illegalist)
-- version 1.0 for DCH++
-- by Sedulus 20030910, requested by BSOD2600
-- 20030919: 1.0
--
-- Translated back to PtokaX (OpiumVolage 9 Sept. 2003)
-- Added timer for automating search
--
-- (using more mem (3 tables, instead of one) but less cpu)
--
-- searches for all terms in the SearchFor table,
-- sends a message to the user that he/she shares the file, with the response
-- message.
-- set disconnectUser to 1 if you want the user disconnected as well (not
-- recommended, as bots always seem to find a way to misinterpret data  )
--
-- spaces in the SearchFor table will be converted to dollar's, but they will
-- (purposely) only match if there's a space in the result later.
-- so "a b" won't match "b a" or "aXXXb"

--// useful stuff
botName = "LAV-FileChecker?"
disconnectUser = nil -- disconnect the user, nil = don't
-- opchatName = "-TropiCo-" -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
opchatName = botName -- set opchat nick here if you want messages to opchat instead of mainchat, else nil
mb = 1024 * 1024
gb = 1024 * mb
-- Timer value, will send search for 1 of the file on all users at each timer
timerValue = 10*1000 -- Every 10 seconds (higher value will reduce load)
useTimer = 1 -- set to 1 to enable timer functions
counter = 1
--// do not modify this table, lookup the meanings in the $Search section in the protocol documentation
SearchTypes = {
ANY = 1,
AUDIO = 2,
COMPRESSED = 3,
DOCUMENT = 4,
EXECUTABLE = 5,
IMAGE = 6,
VIDEO = 7,
FOLDER = 8, -- do not use FOLDER's! the $SR's are formatted differently
}

st = SearchTypes
--// MODIFY THIS TABLE <-------
--      { searchType, words[, minimumSize[, regexMatch]] }
SearchFor = {
["N?o tenhas no share porno destes tipos (pre)teen/incest/sick! L? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] ou Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.IMAGE, "preteen" },
{ st.VIDEO, "preteen" },
{ st.IMAGE, "incest" },
{ st.VIDEO, "incest" },
{ st.IMAGE, "underage" },
{ st.VIDEO, "underage" },
{ st.IMAGE, "teenage sex" },
{ st.VIDEO, "teenage sex" },
},
["N?o tenhas no share aplica??es instaladas e\ou aplica??es descomprimidas! L? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] ou Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.ANY, "explorer.scf" },
{ st.ANY, "explore.ex_" },
{ st.ANY, "cd_clint.dll" },
{ st.EXECUTABLE, "express msimn.exe", 0, "express\\msimn%.exe$" },
{ st.EXECUTABLE, "IEXPLORE.EXE" },
{ st.ANY, "bfdist.vlu" },
{ st.ANY, "War3Inst.log" },
{ st.ANY, "ut2003.log" },
{ st.EXECUTABLE, "NFSHP2.exe" },
{ st.ANY, "avp2.rez" },
{ st.ANY, "ntuser.dat" },
{ st.EXECUTABLE, "winword.exe" },
{ st.ANY, "sav", 0, "%.sav$" },
{ st.ANY, "dll", 0, "%.dll$" },
{ st.ANY, "ex_", 0, "%.ex_$" },
{ st.EXECUTABLE, "setup.exe", 0, "\\setup%.exe$" },
},
["N?o tenhas downloads incompletos no share! L? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.ANY, "antifrag", 0, "antifrag$" },
{ st.ANY, "download dat", 0, "download[0-9]+%.dat$" },
{ st.ANY, "INCOMPLETE~" },
{ st.ANY, "__INCOMPLETE___" },
{ st.ANY, ".part.met"},
{ st.ANY, ".mp3.temp"},
{ st.ANY, " .torrent"},
},
["N?o ? premitido ter DVD's descomprimidos aqui! Remove todos os ficheiros VOB!  L? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] ou Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.ANY, "VTS_01_0.VOB" },
},
["N?o tenhas no share ficheiros WAV! Obrigada pela aten??o, l? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] ou Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.AUDIO, ".wav", 5*mb, "wav$" },
},
["Se tens no teu share copias de ficheiros s? para aumentar o share, estamos de olho em ti... l? as regras em [URL]http://www.lav-sounds.pt.vu[/URL] ou Info: [URL]http://www.ownage.site.vu[/URL]"] = {
{ st.ANY, "copy of", 300*mb, "\\Copy of" },
{ st.ANY, "kopie van", 300*mb, "\\Kopie van" },
},
-- ["Please do not share unzipped DVD's and/or other large files. Use rar-sets."] = {
-- { st.ANY, ".", 1*gb },
-- },
}

--// convert the tables
SearchTable = {}
ResultTable = {}

function Main()
--frmHub:EnableSearchData(1)
frmHub:RegBot(botName)
botLen = string.len( botName )
local i = 0 -- add the serial botnames in here as well.. so the user doesn't think he is flooded by one person
for k,v in SearchFor do
for _,search in v do
-- add $Search
local s = "$Search Hub:"..botName..i.." "
if search[3] then
s = s.."T?F?"..search[3]
else
s = s.."F?F?0"
end
s = s.."?"..search[1].."?"..string.gsub( search[2], " ", "$" ).."|"
table.insert( SearchTable, s )
-- add $SR match
local idx = string.lower( search[2] )
ResultTable[idx] = { msg = k }
if search[4] then ResultTable[idx].regex = string.lower( search[4] ) end
-- next..
i = i + 1
end
end
st, SearchTypes, SearchFor = nil, nil, nil

-- set options
if opchatName then
messageFunc = SendPmToOps
else
messageFunc = SendPmToOps
opchatName = botName
end
if useTimer then SetTimer(timerValue) StartTimer() end
end

-- on new user
function NewUserConnected( client )
table.foreachi(SearchTable, function(_, v) client:SendData( v ) end)
end

-- on $SR
function SRArrival( client, line )
local match = nil
-- test if it was a result to us only
local ret,c,to = string.find( line, "\005([^\005|]*)|$" )
if ret and string.sub( to, 1, botLen ) == botName then
local ret,c,file,size = string.find( line, "^%$SR [^ ]+ ([^\005]*)\005([0-9]+) " )
if ret then
file = string.lower( file )
for k,v in ResultTable do
if ( v.regex and string.find( file, v.regex ) ) or ( not v.regex and string.find( file, k, 1, 1 ) ) then
match = 1
-- warn( client, file.." ("..dchpp.formatBytes( size ).." ("..size..")", v.msg )
warn( client, file.." ("..size.."", v.msg )
end
end
end
end
-- disconnect user
if match and disconnectUser and not client.bOperator then
client:SendData( "<"..botName.."> Est?s a ser Kikado!" )
clientisconnect()
return 1
end
end

function warn( client, file, response )
-- send message to user
client:SendData( "<"..botName.."> Tens no share o seguinte Ficheiro: "..file..": "..response )
if client.bOperator then return end
message = client.sName.." tem no share: "..file
-- send message to all Operators
messageFunc( opchatName, message )
end

function OnTimer()
if table.getn(SearchTable) < 1 then return end
SendToAll(SearchTable[counter])
counter = counter + 1
if counter > table.getn(SearchTable) then counter =1 end
end

Cheers
Title:
Post by: mOrrI on 31 May, 2005, 23:10:54
ok got a bug!?! :(


Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:317: attempt to index global `dchpp' (a nil value)
Title:
Post by: Madman on 01 June, 2005, 02:21:30
QuoteOriginally posted by mOrrI
ok got a bug!?! :(


Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:317: attempt to index global `dchpp' (a nil value)

Comment that line... it was comment before jiten changed it =)
Title:
Post by: jiten on 01 June, 2005, 08:57:05
QuoteOriginally posted by madman
QuoteOriginally posted by mOrrI
ok got a bug!?! :(


Syntax H:\LavSoundsHub3\scripts\LAV-FileChecker.lua5.lua:317: attempt to index global `dchpp' (a nil value)

Comment that line... it was comment before jiten changed it =)
Didn't even notice how I removed that comment. Guess I was too tired for scripting at that time :D .

Best regards
Title:
Post by: Markos on 09 June, 2005, 11:27:19
can wee hav it all in english if poss plzz
how can i protect ops and vips from it
Title:
Post by: mOrrI on 09 June, 2005, 11:31:24
Ok i got it working fine....
i will try to post a english version of this
Title:
Post by: Markos on 09 June, 2005, 11:39:34
nice one m8
doesn't it kick ??
Title:
Post by: mOrrI on 09 June, 2005, 11:44:42
There is an option to disconnect the user i think...
but i don't recomend it...
because if a user has, for example, a mp3 file called  
ricky-badword2005.mp3

where badword is a forbbiden word he will disconnect the user and u want him to disconnect only for bad files...

hope that i made sence...
Title:
Post by: Markos on 09 June, 2005, 12:15:02
yip u did m8 but i want it to just to  search for


INCOMPLETE~
__INCOMPLETE___
.part.met
.mp3.temp
Download10
.GETRIGHT
dctmp
Title:
Post by: Markos on 11 June, 2005, 14:24:59
antifrag

download dat

INCOMPLETE~

__INCOMPLETE___

part.met

mp3.temp

torrent

dctmp

.GETRIGHT

Download10

can sumone make it so it only searches for them files only
Title:
Post by: damo on 11 June, 2005, 15:08:47
why not use dcdm as this has the features you wish from a script and dcdm is much better at finding the files
Title:
Post by: mOrrI on 11 June, 2005, 18:06:47
so why not make a tutorial about configuring a DCDM++ client to do this things? ;)
Title:
Post by: jiten on 11 June, 2005, 19:11:49
Quoteso why not make a tutorial about configuring a DCDM++ client to do this things?
This (http://www.ukdnb.dsl.pipex.com/guide/) one is not that recent, but, may help you some ;)

Cheers
Title:
Post by: Markos on 12 June, 2005, 02:54:00
true but  i dont wont to use to menny clients