Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 2028:4f33100195a0
MUC: Added 'name' config option, for specifying the component's name in disco responses.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 21 Oct 2009 02:18:17 +0500 |
parent | 1781:b3eee6151592 |
child | 2033:38d32c154cec |
comparison
equal
deleted
inserted
replaced
2026:97b17187b29d | 2028:4f33100195a0 |
---|---|
10 if module:get_host_type() ~= "component" then | 10 if module:get_host_type() ~= "component" then |
11 error("MUC should be loaded as a component, please see http://prosody.im/doc/components", 0); | 11 error("MUC should be loaded as a component, please see http://prosody.im/doc/components", 0); |
12 end | 12 end |
13 | 13 |
14 local muc_host = module:get_host(); | 14 local muc_host = module:get_host(); |
15 local muc_name = "Chatrooms"; | 15 local muc_name = module:get_option("name"); |
16 if type(muc_name) ~= "string" then muc_name = "Prosody Chatrooms"; end | |
16 local history_length = 20; | 17 local history_length = 20; |
17 | 18 |
18 local muc_new_room = module:require "muc".new_room; | 19 local muc_new_room = module:require "muc".new_room; |
19 local register_component = require "core.componentmanager".register_component; | 20 local register_component = require "core.componentmanager".register_component; |
20 local deregister_component = require "core.componentmanager".deregister_component; | 21 local deregister_component = require "core.componentmanager".deregister_component; |