1 minetest.register_chatcommand("weather", {
3 description = "Spawn a mob",
4 privs = {server = true},
5 func = function( name, weather)
6 if weather == "0" or weather == "clear" then
8 function_send_weather_type()
10 minetest.chat_send_all(name.." has set the weather to clear!")
11 elseif weather == "1" or weather == "snow" then
13 function_send_weather_type()
14 minetest.chat_send_all(name.." has set the weather to snow!")
16 elseif weather == "2" or weather == "rain" then
18 function_send_weather_type()
20 minetest.chat_send_all(name.." has set the weather to rain!")
21 elseif weather == "" then
22 minetest.chat_send_player(name, "Possible weather types are: 0,clear,1,snow,2,rain")
24 minetest.chat_send_player(name, '"'..weather..'"'.." is not a registered weather type!")