forked from Mineclonia/Mineclonia
add logging on chat command
This commit is contained in:
parent
015b29aa60
commit
d68acad0fd
|
@ -284,6 +284,7 @@ minetest.register_chatcommand("weather", {
|
|||
end
|
||||
|
||||
local def=mcl_weather.get_weatherdef(param)
|
||||
local old_weather=mcl_weather.current
|
||||
if def then
|
||||
mcl_weather.stop_weather(mcl_weather.get_weatherdef(mcl_weather.state))
|
||||
if duration then
|
||||
|
@ -291,6 +292,7 @@ minetest.register_chatcommand("weather", {
|
|||
def.max_duration=duration
|
||||
end
|
||||
mcl_weather.change(param,true)
|
||||
minetest.log("action", "[mcl_weather] " .. name .. " changed the weather from " .. old_weather .. " to " .. param)
|
||||
return true
|
||||
end
|
||||
return false, S("Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.")
|
||||
|
|
Loading…
Reference in New Issue