PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: BlazeXxX on 31 October, 2003, 03:11:52

Title: Anti Advertise/CensorBot
Post by: BlazeXxX on 31 October, 2003, 03:11:52
No Clue who wrote this Script...

-- Start Copying from this line

botname = "Advertising"
trigs = {   ["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,
      ["mine.nu"]=4,["ip.com"]=5,["dynip"]=6,
      ["staticip"]=7,["serveftp"]=8,["ipactive"]=9,["ip.org"]=10
}
function Main()
   frmHub:RegBot(botname)
end

function DataArrival(user, data)
   if (not user.bOperator) then
      if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
         for key,a in trigs do
            if( strfind( strlower(data), key) ) then
               SendToAll( botname, user.sName.." has been kicked because of advertising." )
               user:Disconnect()
            end
         end
      end
   end
end

-- Finish Copying