From 6ba4266de1171d9c9dee411ad0ed1a43ada0dc17 Mon Sep 17 00:00:00 2001 From: upsilon Date: Sat, 11 Feb 2017 15:01:42 +0100 Subject: [PATCH] Print a warning if the speech dispatcher isn't installed --- moremesecons_sayer/init.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/moremesecons_sayer/init.lua b/moremesecons_sayer/init.lua index c286ae8..8dab207 100644 --- a/moremesecons_sayer/init.lua +++ b/moremesecons_sayer/init.lua @@ -21,11 +21,17 @@ if use_speech_dispatcher then execute = ie.os.execute end end + + if use_speech_dispatcher then + if popen("if hash spd-say 2>/dev/null; then printf yes; fi"):read("*all") ~= "yes" then + minetest.log("warning", "[moremesecons_sayer] use_speech_dispatcher = true, but it seems the speech dispatcher isn't installed on your system") + use_speech_dispatcher = false + end + end end local sayer_activate -if use_speech_dispatcher -and popen("if hash spd-say 2>/dev/null; then printf yes; fi"):read("*all") == "yes" then +if use_speech_dispatcher then minetest.log("info", "[moremesecons_sayer] using speech dispatcher") local tab = { "spd-say",