PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: lazyj189 on 20 October, 2003, 06:16:53

Title: need help with filescontrolbot
Post by: lazyj189 on 20 October, 2003, 06:16:53
-- FilesControlBot by aMutex 02.01.2003
botname = "botname"
trigs = {
lolita="[USER] shares/is looking for lolita porn",
preteen="[USER] shares/is looking for preteen porn",
incest="[USER] shares/is looking for incest porn",
animalsex="[USER] shares/is looking for sex with animals",
rape="[USER] shares/is looking for rape stuff",
hitler="[USER] shares/is looking for nazistuff"
}

function DataArrival(user, data)

if ((strlower(strsub(data,1,3))=="$sr")or(strlower(strsub(data,1,7))=="$search")) then
for key, value in trigs do
if( strfind( strlower(data), key) ) then
answer, x = gsub(value, "%b[]", user.sName)
SendToOps( botname, answer )

end

end
end
end


What I was wondering is, 1st thing, the bot isnt notifying any ops to any of those searches being submitted, which is fine.  My main question is would it be possible to modify it so that if any user submits a search with any of those search requests, that the first time, the search is blocked and they get a warning advising them to not be searching in this hub for any of those type of files.  And if they search a 2nd time, they get a tempban, and a notification is sent to the ops of who got kicked and for why with their ip?  Thanks.
Title:
Post by: pHaTTy on 20 October, 2003, 06:27:42
yes it is possible, but not good, try search for grape, it will then kick you for rape ;)

so not a good idea :o)
Title:
Post by: lazyj189 on 20 October, 2003, 06:31:27
well, rape isnt one of the searches I would have it watch for since there are a lot of mp3's with the word "rape" in it.  I'm thinking more obvious words like preteen, underage, lolita, animal sex, obvious words like that.  What I posted was, if I remember correctly, just what I downloaded, unmodified.
Title:
Post by: pHaTTy on 20 October, 2003, 06:41:20
ok her yo go


-- Based on FilesControlBot by aMutex 02.01.2003
-- Conquerer by Phatty
-- v1.00

botname = "Conquerer"
conquer={}

trigs = {
lolita="[USER] shares/is looking for lolita porn",
preteen="[USER] shares/is looking for preteen porn",
incest="[USER] shares/is looking for incest porn",
animalsex="[USER] shares/is looking for sex with animals,hmm lost for words",
download10="[USER] shares/is looking for kazaa files"
}

function DataArrival(user, data)

if ((strlower(strsub(data,1,3))=="$sr")or(strlower(strsub(data,1,7))=="$search")) then
for key, value in trigs do
if( strfind( strlower(data), key) ) then
answer, x = gsub(value, "%b[]", user.sName)
SendToOps( botname, answer )
end
if conquer[user.sName]==nil then conquer[user.sName]=1
user:SendPM(botname,"Use a bad searh again and your gone")
return 1
elseif conquer[user.sName]==1 then conquer[user.sName]=nil
user:SendPM(botname,"Ok num nuts youve been conquered")
SendToOps(botname,"I ahve conquered: "..user.sName)
user:Ban()
return 1
end
end
end
end


l8rr,, dude

-phatty
Title:
Post by: lazyj189 on 20 October, 2003, 07:06:19
thanks a lot.  I'll have to test it some more cause it looks right enough to me, but it isnt doing what it's supposed to do.  Wonder if it could be any of the other scripts I'm running interferring (blah cant spell).  I am runnin:

triggers.lua
offlinebot.lua
searchcount-v.1.3.lua
-robocop-v3.x-Beta.lua
imdb.lua
HubTime-V.1.63.lua
Logger-V.2.59.lua
filescontrolbot.lua.
Title:
Post by: pHaTTy on 20 October, 2003, 07:07:47
try the script by itself firsrt if it works, then remove one script at a time until you know which one it is ;)
Title:
Post by: lazyj189 on 25 October, 2003, 23:43:17
ok, I finally got to try the script just by itself, no other scripts running, and it didn't work at all.  Any ideas?
Title:
Post by: lazyj189 on 09 November, 2003, 00:47:35
Not giving up on this thread at all.  I do have the script all by itself, and it's not working.  Been trying to play with it and a few others still with no luck.
Title:
Post by: lynyrd on 21 December, 2003, 03:42:09
maybe this one?
------------------------------------------------------------------------
AdminName = "[SU]xxxx"

--FilesControlBot by aMutex 02.01.2003
-- fixed for testdrive 4 by plop

botname = "Pervert--->"
trigs = {
lolita="[USER] kollar efter/delar lolita filer!",
preteen="[USER] shares/is looking for preteen porn",
incest="[USER] shares/is looking for incest porn",
animalsex="[USER] shares/is looking for sex with animals,hmm lost for words",
rape="[USER] shares/is looking for rape stuff",
childporn="[USER] tittar efter barnporr childporn",
kiddysex="[USER] tittar efter barnporr kiddysex",
raygold="[USER] tittar efter barnporr raygold",
prelolita="[USER] tittar efter barnporr prelolita",
beastiality="[USER] tittar efter djursex",
defloration="[USER] tittar efter barnporr defloration",
underage="[USER] tittar efter barnporr underage",
animalporn="[USER] tittar efter djursex",
snuff="[USER] tittar efter snuff",
illegal="[USER] tittar efter illegal"
}

function Main()
   frmHub:EnableSearchData(1)
end

function DataArrival(user, data)
   if ((strlower(strsub(data,1,3))=="$sr")or(strlower(strsub(data,1,7))=="$search")) then
      for key, value in trigs do
         if( strfind( strlower(data), key) ) then
            answer, x = gsub(value, "%b[]", user.sName)
--optional send pm to admin or op's just remove "--"
--SendPmToNick(AdminName, botname, answer )
            SendPmToOps(botname,answer )            
--optional ban or just disconnect remove "--"
--          user:Ban()            
            user:Disconnect()
           
         end
      end
   end
end
------------------------------------------------------------------------
it works for me...im a noob i know  :)