equal
deleted
inserted
replaced
1 |
1 |
2 local rooms = module:shared "muc/rooms"; |
2 local mod_muc = module:depends"muc"; |
|
3 local rooms = rawget(mod_muc, "rooms"); -- Old MUC API |
3 if not rooms then |
4 if not rooms then |
4 module:log("error", "This module only works on MUC components!"); |
5 rooms = module:shared"muc/rooms"; -- New MUC API |
5 return; |
|
6 end |
6 end |
7 |
7 |
8 local jid_split, jid_bare = require "util.jid".split, require "util.jid".bare; |
8 local jid_split, jid_bare = require "util.jid".split, require "util.jid".bare; |
9 local st = require "util.stanza"; |
9 local st = require "util.stanza"; |
10 local new_throttle = require "util.throttle".create; |
10 local new_throttle = require "util.throttle".create; |