Changeset

6235:d433db49e353

plugins/muc/mod_muc: Use get_option_string instead of get_option and checking
author daurnimator <quae@daurnimator.com>
date Mon, 28 Apr 2014 16:33:54 -0400
parents 6234:cc8a6ca2d7c5
children 6236:ee996e679f15
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Mon Apr 28 16:30:53 2014 -0400
+++ b/plugins/muc/mod_muc.lua	Mon Apr 28 16:33:54 2014 -0400
@@ -13,8 +13,6 @@
 end
 
 local muc_host = module:get_host();
-local muc_name = module:get_option("name");
-if type(muc_name) ~= "string" then muc_name = "Prosody Chatrooms"; end
 local restrict_room_creation = module:get_option("restrict_room_creation");
 if restrict_room_creation then
 	if restrict_room_creation == true then
@@ -44,7 +42,7 @@
 muclib.set_max_history_length(module:get_option_number("max_history_messages"));
 
 module:depends("disco");
-module:add_identity("conference", "text", muc_name);
+module:add_identity("conference", "text", module:get_option_string("name", "Prosody Chatrooms"));
 module:add_feature("http://jabber.org/protocol/muc");
 module:depends "muc_unique"
 module:require "muc/lock";