mod_swedishchef: Fix logging and traceback uncovered by util.format (thanks Kafkei)
--- a/mod_swedishchef/mod_swedishchef.lua Fri Sep 29 09:18:24 2017 +0100
+++ b/mod_swedishchef/mod_swedishchef.lua Tue Oct 03 22:47:27 2017 +0200
@@ -64,7 +64,7 @@
body = body:get_text();
if body and (body:find(trigger_string, 1, true) == 1) then
- module:log("debug", body:find(trigger_string, 1, true));
+ module:log("debug", "Found trigger: %s", body:match(trigger_string, 1, true));
stanza[bodyindex][1] = swedish(body:gsub("^" .. trigger_string, "", 1));
end
end