declare("SendChat2") function SendChat2(str, chan, name) if not name then name = "" end chan = chan:upper() if #str <= 256 then buffer:SendChat(str, chan, name) return end local num = 1 for i = 1, 30 do -- don"t want to spam chat TOO much local newstr = str:sub(num, num+256) if not newstr then break end if newstr == "" then break end buffer:SendChat(newstr, chan, name) num = num+256 end end declare("buffer", {}) buffer.timer = Timer() buffer.channel = false buffer.group = false buffer.guild = false buffer.private = false buffer.sector = false function buffer:SendChat(str, chan, name) if not name then name = "" end chan = chan:upper() if chan == "SAY" then chan = "SECTOR" end local timer = Timer() if self[chan:lower()] then timer:SetTimeout(5, function() self:SendChat(str, chan, name) end) return end self[chan:lower()] = true self.timer:SetTimeout(360, function() self[chan:lower()] = false end) SendChat(str, chan, name) end