mod_muc_limits: Abort loading on non-MUC hosts (thanks Ge0rG)
authorMatthew Wild <mwild1@gmail.com>
Fri, 07 Jun 2013 14:29:01 +0100
changeset 1057 0b41122b19f9
parent 1056 b307b72ae527
child 1058 1255de347dd4
mod_muc_limits: Abort loading on non-MUC hosts (thanks Ge0rG)
mod_muc_limits/mod_muc_limits.lua
--- 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";