--KeikoNoAskSlotBot by Phatty --v1.17 --Fixed a little error --Added warnings --No longer applies to ops --PM checks only --Minor optimisation --Added Timed Advert --Timed add switch Bot = "Keiko" mainnpm = 1 --1 check pm and main, 0 will check only pm TimeAd = 1 --0 will switch off the timed add Warned = {} TimeWra = "1" --mins to be banned for on first warning TimeWrx = "2" --mins to be banned on second warning function Main() SetTimer(600000) StartTimer() end function OnTimer() if TimedAd == 1 then SendToAll("---------=====================================================----") SendToAll(Bot,"..///DO NOT ask for slots in this hub, YOU WILL be kicked\\\..") SendToAll("---------=====================================================----") end end function DataArrival(user,data) if( strfind(data, "have" and "slot",1,1)) then if mainnpm==1 then if not user.bOperator then if Warned[user.sName]==nil then Warned[user.sName]=1 user:SendData(Bot,"Do not ask for slots...goodbye :o)") user:TimeBan(TimeWra) SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot") return 1 elseif Warned[user.sName]==1 then Warned[user.sName]=2 user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)") user:TimeBan(TimeWrx) SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning") return 1 elseif Warned[user.sName]==2 then Warned[user.sName]=nil user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)") user:Ban() SendToAll(Bot,user.sName.." was banned for asking for slots on third warning") return 1 end end end else if(strsub(data, 1, 4) == "$To:") then if( strfind(data, "have" and "slot",1,1) ) then if not user.bOperator then if Warned[user.sName]==nil then Warned[user.sName]=1 user:SendData(Bot,"Do not ask for slots...goodbye :o)") user:TimeBan(TimeWra) SendToAll(Bot,user.sName.." was banned for "..TimeWra.."mins for asking for a slot") return 1 elseif Warned[user.sName]==1 then Warned[user.sName]=2 user:SendData(Bot,"Ive told you DO NOT ask for slots...goodbye :o)") user:TimeBan(TimeWrx) SendToAll(Bot,user.sName.." was banned for "..TimeWrx.."mins for asking for a slot on second warning") return 1 elseif Warned[user.sName]==2 then Warned[user.sName]=nil user:SendData(Bot,"Ok num nuts ive had enough of you...goodbye :o)") user:Ban() SendToAll(Bot,user.sName.." was banned for asking for slots on third warning") return 1 end end end end end end