PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: Skynet on 03 March, 2005, 16:07:41

Title: Basic Illegalist bot to Lua5
Post by: Skynet on 03 March, 2005, 16:07:41
Converted  Ptaczek Illegalist bot ,i use it alot  
converted basic script to lua5
 


code:---------------------------------------------------------------------------------------------------
-- Created by Ptaczek, Jan-3, 2003
-- Searches for specified patterns. Useful for illegal share checking

BotName = "ShareCheck"

Files = {
["rape"]="Do not share sick porn!",
["preteen"]="No pre-teen here!",
["nazi"]="No nazi related material here!",
[".VOB"]="No VOB files here!"
}

Kicked = {}

function NewUserConnected(user)
if( Kicked[user.sName] == 1 ) then
Kicked[user.sName] = nil
end
for i,v in Files do
user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i)
end
end

function ChatArrival(user, data)
if( string.sub(data, 1, 3) == "$SR" ) then
_,_,nick = string.find( data, "\05(%S*)|$" )
if( nick == BotName and Kicked[user.sName] == nil ) then
Kicked[user.sName] = 1
Reason = FindWhat(data)
SendToOps(BotName, "*** User "..user.sName.." kicked. Reason: "..Reason)
user:SendPM(BotName, "You were kicked. "..Reason)
user:Disconnect()
end
end
end

function FindWhat(data)
for i,v in Files do
if( string.find(string.lower(data), i) ) then
return v
end
end
return "Other files"
end

code:--------------------------------------------------------------------------------------------------
Title:
Post by: uffetjur on 04 March, 2005, 11:31:54
bah, op clients are better
samples for dvd rar archives is included in original releases this samples are of format .vob and about 50 - 70 mb this script doesnt sort that one out