Diff

mod_muc_limits/mod_muc_limits.lua @ 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
parent 1042:5fd0860c86cd
child 1058:1255de347dd4
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";