Diff

mod_swedishchef/mod_swedishchef.lua @ 2780:d93a73282a93

mod_swedishchef: Fix logging and traceback uncovered by util.format (thanks Kafkei)
author Kim Alvefur <zash@zash.se>
date Tue, 03 Oct 2017 22:47:27 +0200
parent 2779:c53cc1ae4788
line wrap: on
line diff
--- 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