Fix warning when the IRC mod isn't installed

This commit is contained in:
luk3yx 2019-07-03 07:38:52 +12:00
parent 8a738f72fb
commit 8fbaefddc0
1 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,9 @@ local checkReboot
checkReboot = function()
if reboot and next(minetest.get_connected_players()) == nil then
-- Time to reboot
if irc then irc.say("The server is empty! Rebooting...") end
if minetest.global_exists('irc') then
irc.say("The server is empty! Rebooting...")
end
minetest.request_shutdown("Rebooting...", true, 1)
end
end