# HG changeset patch # User Jonas Schäfer # Date 1622295281 -7200 # Node ID 785389a2d2b3cf225e1d8024f387c20dfb59e61e # Parent b305814bd93016a6a7a6fb97535e3884922aca19 mod_muc_dicebot: ignore messages without body diff -r b305814bd930 -r 785389a2d2b3 mod_muc_dicebot/mod_muc_dicebot.lua --- a/mod_muc_dicebot/mod_muc_dicebot.lua Sat May 29 15:17:05 2021 +0200 +++ b/mod_muc_dicebot/mod_muc_dicebot.lua Sat May 29 15:34:41 2021 +0200 @@ -37,6 +37,10 @@ local stanza = event.stanza; local body = stanza:get_child("body"); + if not body then + return + end + local text = body:get_text(); module:log("error", "%q %q %q", stanza, body, text); local dice = s_match(text, "^[%.!]r%s(.+)$");