mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Changes to the new user system to add the modularity developed for the asset
system
This commit is contained in:
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Asset
|
||||
IConfig assetConfig = source.Configs["AssetService"];
|
||||
if (assetConfig == null)
|
||||
{
|
||||
m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpanSim.ini");
|
||||
m_log.Error("[ASSET CONNECTOR]: AssetService missing from OpenSim.ini");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,16 +25,23 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Servers.Base;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserService;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||
{
|
||||
public class LocalUserServicesConnector : ISharedRegionModule
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(
|
||||
MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IUserService m_UserService;
|
||||
|
||||
private bool m_Enabled = false;
|
||||
@@ -52,8 +59,34 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||
string name = moduleConfig.GetString("UserServices", "");
|
||||
if (name == Name)
|
||||
{
|
||||
IConfig userConfig = source.Configs["UserService"];
|
||||
if (userConfig == null)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: UserService missing from OpenSim.ini");
|
||||
return;
|
||||
}
|
||||
|
||||
string serviceDll = userConfig.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
|
||||
if (serviceDll == String.Empty)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: No LocalServiceModule named in section UserService");
|
||||
return;
|
||||
}
|
||||
|
||||
Object[] args = new Object[] { source };
|
||||
m_UserService =
|
||||
ServerUtils.LoadPlugin<IUserService>(serviceDll,
|
||||
args);
|
||||
|
||||
if (m_UserService == null)
|
||||
{
|
||||
m_log.Error("[USER CONNECTOR]: Can't load user service");
|
||||
return;
|
||||
}
|
||||
m_Enabled = true;
|
||||
m_UserService = new UserService(source);
|
||||
m_log.Info("[USER CONNECTOR]: Local user connector enabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using OpenSim.Services.UserService;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.ServiceConnectors.User
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user