From 16efb78698fc505fb33ad87962b39047939d636c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 11 May 2009 22:54:09 +0000 Subject: Changes to the new user system to add the modularity developed for the asset system --- OpenSim/Servers/User/UserServerConnector.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim/Servers') diff --git a/OpenSim/Servers/User/UserServerConnector.cs b/OpenSim/Servers/User/UserServerConnector.cs index c20cc31..15b09bc 100644 --- a/OpenSim/Servers/User/UserServerConnector.cs +++ b/OpenSim/Servers/User/UserServerConnector.cs @@ -25,9 +25,10 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using Nini.Config; +using OpenSim.Servers.Base; using OpenSim.Services.Interfaces; -using OpenSim.Services.UserService; using OpenSim.Framework.Servers.HttpServer; namespace OpenSim.Servers.UserServer @@ -38,7 +39,19 @@ namespace OpenSim.Servers.UserServer public UserServiceConnector(IConfigSource config, IHttpServer server) { - m_UserService = new UserService(config); + IConfig serverConfig = config.Configs["UserService"]; + if (serverConfig == null) + throw new Exception("No section 'Server' in config file"); + + string userService = serverConfig.GetString("LocalServiceModule", + String.Empty); + + if (userService == String.Empty) + throw new Exception("No UserService in config file"); + + Object[] args = new Object[] { config }; + m_UserService = + ServerUtils.LoadPlugin(userService, args); } } } -- cgit v1.1