changeset 1057:0b41122b19f9

mod_muc_limits: Abort loading on non-MUC hosts (thanks Ge0rG)
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Jun 2013 14:29:01 +0100
parents b307b72ae527
children 1255de347dd4
files mod_muc_limits/mod_muc_limits.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_limits/mod_muc_limits.lua	Fri Jun 07 17:54:45 2013 +0700
+++ b/mod_muc_limits/mod_muc_limits.lua	Fri Jun 07 14:29:01 2013 +0100
@@ -1,3 +1,8 @@
+
+if not hosts[module.host].modules.muc then
+	module:log("error", "This module only works on MUC components!");
+	return;
+end
 
 local jid_split, jid_bare = require "util.jid".split, require "util.jid".bare;
 local st = require "util.stanza";