local QuitTAB = {
	"nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn",
	}

function DisconnectWithMessage(what)
	if not package.loaded.sourcenet3 then
		require("sourcenet3") --Load here, less chance of crashing!
	end
	if not package.loaded.sourcenet3 then
		return
	end
	
	local chan = CNetChan()
	if not chan then return end
	local buff = chan:GetReliableBuffer()
		buff:WriteUBitLong(net_Disconnect, 6)
		buff:WriteString(what)
	CNetChan():Transmit()
end


local function quit_message(ply,cmd,args)
	local NewMsg = table.Random(QuitTAB)
	
	if (args and #args > 0) then
		NewMsg = table.concat(args," ")
	end
	
	if cmd then --Instant
		DisconnectWithMessage(NewMsg)
	else
		timer.Simple(1, DisconnectWithMessage, NewMsg)
	end
end
concommand.Add("quit_message", quit_message)