public void Initialise(IConfigSource source)
{
IConfig moduleConfig = source.Configs["Modules"];
if (moduleConfig != null)
{
string name = moduleConfig.GetString("UserAccountServices", "");
if (name == Name)
{
IConfig userConfig = source.Configs["UserAccountService"];
if (userConfig == null)
{
m_log.Error("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: UserAccountService missing from OpenSim.ini");
return;
}
string serviceDll = userConfig.GetString("LocalServiceModule", String.Empty);
if (serviceDll == String.Empty)
{
m_log.Error("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: No LocalServiceModule named in section UserService");
return;
}
Object[] args = new Object[] { source };
m_UserService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args);
if (m_UserService == null)
{
m_log.ErrorFormat(
"[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll);
return;
}
m_Enabled = true;
m_Cache = new UserAccountCache();
m_log.Info("[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Local user connector enabled");
}
}
}