The Welcome message /message of the day shown in the client during login, can now be set from the .INI file for standalone mode (change the standalone_welcome = "Welcome to OpenSim" line).
parent
82f8ecf673
commit
7fbc3266df
|
@ -72,6 +72,8 @@ namespace OpenSim
|
||||||
private string m_logFilename = ("region-console.log");
|
private string m_logFilename = ("region-console.log");
|
||||||
|
|
||||||
private bool standaloneAuthenticate = false;
|
private bool standaloneAuthenticate = false;
|
||||||
|
private string welcomeMessage = null;
|
||||||
|
|
||||||
public ConsoleCommand CreateAccount = null;
|
public ConsoleCommand CreateAccount = null;
|
||||||
|
|
||||||
public OpenSimMain(IConfigSource configSource)
|
public OpenSimMain(IConfigSource configSource)
|
||||||
|
@ -104,6 +106,7 @@ namespace OpenSim
|
||||||
m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
||||||
|
|
||||||
standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false);
|
standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false);
|
||||||
|
welcomeMessage = configSource.Configs["Startup"].GetString("standalone_welcome", "Welcome to OpenSim");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -123,7 +126,7 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_sandbox)
|
if (m_sandbox)
|
||||||
{
|
{
|
||||||
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, standaloneAuthenticate);
|
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, standaloneAuthenticate, welcomeMessage);
|
||||||
m_commsManager = localComms;
|
m_commsManager = localComms;
|
||||||
if(standaloneAuthenticate)
|
if(standaloneAuthenticate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,10 +40,10 @@ namespace OpenSim.Region.Communications.Local
|
||||||
public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
|
public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
|
||||||
public LocalUserServices UserServices;
|
public LocalUserServices UserServices;
|
||||||
|
|
||||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate )
|
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage )
|
||||||
: base(serversInfo, httpServer, assetCache)
|
: base(serversInfo, httpServer, assetCache)
|
||||||
{
|
{
|
||||||
UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate);
|
UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate, welcomeMessage);
|
||||||
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
|
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
|
||||||
UserServer = UserServices;
|
UserServer = UserServices;
|
||||||
GridServer = SandBoxServices;
|
GridServer = SandBoxServices;
|
||||||
|
|
|
@ -16,14 +16,19 @@ namespace OpenSim.Region.Communications.Local
|
||||||
private uint defaultHomeX ;
|
private uint defaultHomeX ;
|
||||||
private uint defaultHomeY;
|
private uint defaultHomeY;
|
||||||
private bool authUsers = false;
|
private bool authUsers = false;
|
||||||
|
private string welcomeMessage = "Welcome to OpenSim";
|
||||||
|
|
||||||
public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate)
|
public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate, string welcomeMess)
|
||||||
{
|
{
|
||||||
m_Parent = parent;
|
m_Parent = parent;
|
||||||
this.serversInfo = serversInfo;
|
this.serversInfo = serversInfo;
|
||||||
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
||||||
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
||||||
this.authUsers = authenticate;
|
this.authUsers = authenticate;
|
||||||
|
if (welcomeMess != "")
|
||||||
|
{
|
||||||
|
this.welcomeMessage = welcomeMess;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfileData GetUserProfile(string firstName, string lastName)
|
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||||
|
@ -47,7 +52,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public override string GetMessage()
|
public override string GetMessage()
|
||||||
{
|
{
|
||||||
return "Welcome to OpenSim";
|
return welcomeMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData GetTheUser(string firstname, string lastname)
|
public override UserProfileData GetTheUser(string firstname, string lastname)
|
||||||
|
@ -59,13 +64,17 @@ namespace OpenSim.Region.Communications.Local
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
//no current user account so make one
|
if (!authUsers)
|
||||||
Console.WriteLine("No User account found so creating a new one ");
|
{
|
||||||
this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
|
//no current user account so make one
|
||||||
|
Console.WriteLine("No User account found so creating a new one ");
|
||||||
profile = getUserProfile(firstname, lastname);
|
this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
|
||||||
|
|
||||||
return profile;
|
profile = getUserProfile(firstname, lastname);
|
||||||
|
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool AuthenticateUser(UserProfileData profile, string password)
|
public override bool AuthenticateUser(UserProfileData profile, string password)
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace SimpleApp
|
||||||
{
|
{
|
||||||
base.StartUp();
|
base.StartUp();
|
||||||
|
|
||||||
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, false);
|
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, false, "");
|
||||||
|
|
||||||
m_log.Notice(m_log.LineInfo);
|
m_log.Notice(m_log.LineInfo);
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,4 @@ gridmode = false
|
||||||
physics = basicphysics
|
physics = basicphysics
|
||||||
storage_plugin = "OpenSim.DataStore.NullStorage.dll"
|
storage_plugin = "OpenSim.DataStore.NullStorage.dll"
|
||||||
standalone_authenticate = false
|
standalone_authenticate = false
|
||||||
|
standalone_welcome = "Welcome to OpenSim"
|
Loading…
Reference in New Issue