Check whether or not irc is enable before looking for its object

This commit is contained in:
LeMagnesium 2015-06-29 20:52:23 +02:00
parent 5a87525357
commit 3189fa48d4
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ data.send_func = function(name, msg) minetest.chat_send_player(name, msg) end
if data.PUB_MSG then
data.send_func = function (name, msg)
if irc then
if minetest.get_modpath("irc") then
irc:say(msg)
end
minetest.chat_send_all(msg)