All pastes #839686 Raw Edit

slime73

public lua v1 · immutable
#839686 ·published 2007-12-31 04:22 UTC
rendered paste body
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	endenddeclare("buffer", {})buffer.timer = Timer()buffer.channel = falsebuffer.group = falsebuffer.guild = falsebuffer.private = falsebuffer.sector = falsefunction 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