# HG changeset patch # User Kim Alvefur # Date 1285518204 -7200 # Node ID 7410d1005fea821d9646cfbd4d4d5106afc360f1 # Parent 8eae74a31acb954553b3b849fd9446f1b1c78443 mod_muc_intercom: Fix traceback on topic changes diff -r 8eae74a31acb -r 7410d1005fea mod_muc_intercom/mod_muc_intercom.lua --- a/mod_muc_intercom/mod_muc_intercom.lua Mon Sep 20 21:10:49 2010 +0100 +++ b/mod_muc_intercom/mod_muc_intercom.lua Sun Sep 26 18:23:24 2010 +0200 @@ -19,6 +19,7 @@ local from_room, from_host, from_nick = jid.split(from_room_jid); local body = stanza:get_child("body"); + if not body then return; end -- No body, like topic changes body = body and body:get_text(); -- I feel like I want to do `or ""` there :/ local target_room, message = body:match("^@([^:]+):(.*)"); if not target_room or not message then return; end