Software /
code /
prosody-modules
Changeset
1768:163967467308
mod_muc_limits: Update to work with both the new and the old MUC API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Jun 2015 19:15:55 +0200 |
parents | 1767:ca48eea4785c |
children | 1769:f2705465cab4 |
files | mod_muc_limits/mod_muc_limits.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_muc_limits/mod_muc_limits.lua Mon Jun 08 15:29:33 2015 +0200 +++ b/mod_muc_limits/mod_muc_limits.lua Thu Jun 18 19:15:55 2015 +0200 @@ -1,8 +1,8 @@ -local rooms = module:shared "muc/rooms"; +local mod_muc = module:depends"muc"; +local rooms = rawget(mod_muc, "rooms"); -- Old MUC API if not rooms then - module:log("error", "This module only works on MUC components!"); - return; + rooms = module:shared"muc/rooms"; -- New MUC API end local jid_split, jid_bare = require "util.jid".split, require "util.jid".bare;