-- function Main() -- query = "" -- VH:SQLQuery(query) i=0 while true do i=i+1 if i>5 then i=0 query = "select `nick`,`message` from `messages`" res, rows = VH:SQLQuery(query) if res then for x=0, rows-1 do local res, nick, message = VH:SQLFetch(x) VH:SendDataToAll("<"..nick.."> "..message.."|", 1, 10) end query = "truncate `messages`" VH:SQLQuery(query) end end end -- end