mod_swedishchef: Fix logging and traceback uncovered by util.format (thanks Kafkei)
authorKim Alvefur <zash@zash.se>
Tue, 03 Oct 2017 22:47:27 +0200
changeset 2784 d93a73282a93
parent 2783 c53cc1ae4788
child 2785 fe5bb7b13a59
mod_swedishchef: Fix logging and traceback uncovered by util.format (thanks Kafkei)
mod_swedishchef/mod_swedishchef.lua
--- 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