fixed crash if irc mod disabled

This commit is contained in:
crabman77 2015-06-22 22:18:33 +02:00
parent 33b9b0b7ff
commit 9904ae3bda
1 changed files with 3 additions and 2 deletions

View File

@ -119,8 +119,9 @@ if RANDOM_MESSAGES == true then
-- Actually tell something
minetest.chat_send_all(death_message)
irc:say(death_message)
if minetest.get_modpath("irc") ~= nil then
irc:say(death_message)
end
minetest.sound_play(sounds[math.random(1,#sounds)],{to_player=player:get_player_name(),gain=soundset.get_gain(player:get_player_name(),"other")})
sound_play_all(player:get_player_name())
end)