Preheat the oven to 200°C
Saute the onion in only 50g of the butter/margarine for about 5 mins until it's softened. Add the rice, chilli, cloves and sultanas and stir. Add the water, bring to the boil. Reduce the heat, and simmer for about 15 mins until the water is absorbed. Add a little more water if necessary, but make sure it is all absorbed. Season with salt and pepper to taste.
Steam the squash, which will take about 5 mins until it's tender. Butter a large ovenproof dish and sprinkle the base with 1 tablespoon of the sugar. Mix the remaining sugar with the spices. Melt the remaining butter or margarine.
Arrange half the squash pieces in the dish, sprinkle with half the spice mixture and half the remaining butter/margarine. Spoon the rice on top in one layer. Then repeat the layer of squash, spice and butter/margarine. Press down firmly so the surface is flat.
Bake in the oven at 200C for 20-30 mins until lightly caramelised on top.
Serve with green vegetables and possibly some Moroccan breads -- .