READ THE RULES
0 Members and 1 Guest are viewing this topic.
-------------------------------------------------------------------------------- -- Simple Anti-Advert Blocker -- Added allowed profile option-- Added .TBL file -------------------------------------------------------------------------------- --- Config Stuff Antiadds = { adds = "adds.tbl",}Allowed = { [0] = 1, -- Master [1] = 0, -- Operator [2] = 0, -- VIP [3] = 0, -- Reg [-1] = 0, -- User}Messagetosend = { mess = "Sorry, your PM was blocked. Please use main chat to post adverts!"}Bot = { bot = "{-Twisteds-Soul-}"}-------------------------------------------------------------- OnStartup = function() if loadfile(Antiadds.adds) then dofile(Antiadds.adds) endendBot = Bot.botfunction ToArrival(user,data) Core.GetUserAllData(user) if user.iProfile ~= 0 then for key,a in pairs(adds) do if( string.find(string.lower(data), key) ) then Core.SendPmToNick(user.sNick,Bot, (Messagetosend.mess)) return true end end end end