WARNUSER = {} MAX = 10 function DataArrival(user, data) if strsub(data,1,1) == "<" then data=strsub(data,1,strlen(data)-1) s,e,cmd,vic = strfind(data,"%b<>%s+(%S+)%s+(%S+)") if cmd == "+warnu" then Warnit(user, data) return 1 end end end function Warnit(user, data) local victim = GetItemByName(vic) if victim == nil then user:SendData("*** ERROR") elseif victim ~= nil then if WARNUSER[victim.sName]==nil then WARNUSER[victim.sName] = 0 end if WARNUSER[victim.sName] == (MAX - 1) then SendToAll("*** "..victim.sName.." has been warned "..MAX.." of "..MAX..", He is now banned") victim:SendPM("You have been voted out, You are now timebanned for "..time) WARNUSER[victim.sName]=nil; victim:TimeBan(20) victim:Disconnect() else WARNUSER[victim.sName] = WARNUSER[victim.sName] + 1 SendToAll("*** "..victim.sName.." Has been warned "..WARNUSER[victim.sName].." Time(s) of "..MAX) end if victim.bOperator then user:Disconnect() end end end