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 bool standaloneAuthenticate = false;
|
||||
private string welcomeMessage = null;
|
||||
|
||||
public ConsoleCommand CreateAccount = null;
|
||||
|
||||
public OpenSimMain(IConfigSource configSource)
|
||||
|
@ -104,6 +106,7 @@ namespace OpenSim
|
|||
m_storageDLL = configSource.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
||||
|
||||
standaloneAuthenticate = configSource.Configs["Startup"].GetBoolean("standalone_authenticate", false);
|
||||
welcomeMessage = configSource.Configs["Startup"].GetString("standalone_welcome", "Welcome to OpenSim");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -123,7 +126,7 @@ namespace OpenSim
|
|||
|
||||
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;
|
||||
if(standaloneAuthenticate)
|
||||
{
|
||||
|
|
|
@ -40,10 +40,10 @@ namespace OpenSim.Region.Communications.Local
|
|||
public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
|
||||
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)
|
||||
{
|
||||
UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate);
|
||||
UserServices = new LocalUserServices(this, serversInfo, accountsAuthenticate, welcomeMessage);
|
||||
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
|
||||
UserServer = UserServices;
|
||||
GridServer = SandBoxServices;
|
||||
|
|
|
@ -16,14 +16,19 @@ namespace OpenSim.Region.Communications.Local
|
|||
private uint defaultHomeX ;
|
||||
private uint defaultHomeY;
|
||||
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;
|
||||
this.serversInfo = serversInfo;
|
||||
defaultHomeX = this.serversInfo.DefaultHomeLocX;
|
||||
defaultHomeY = this.serversInfo.DefaultHomeLocY;
|
||||
this.authUsers = authenticate;
|
||||
if (welcomeMess != "")
|
||||
{
|
||||
this.welcomeMessage = welcomeMess;
|
||||
}
|
||||
}
|
||||
|
||||
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||
|
@ -47,7 +52,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
/// <returns></returns>
|
||||
public override string GetMessage()
|
||||
{
|
||||
return "Welcome to OpenSim";
|
||||
return welcomeMessage;
|
||||
}
|
||||
|
||||
public override UserProfileData GetTheUser(string firstname, string lastname)
|
||||
|
@ -59,6 +64,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
return profile;
|
||||
}
|
||||
|
||||
if (!authUsers)
|
||||
{
|
||||
//no current user account so make one
|
||||
Console.WriteLine("No User account found so creating a new one ");
|
||||
this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY);
|
||||
|
@ -67,6 +74,8 @@ namespace OpenSim.Region.Communications.Local
|
|||
|
||||
return profile;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public override bool AuthenticateUser(UserProfileData profile, string password)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace SimpleApp
|
|||
{
|
||||
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);
|
||||
|
||||
|
|
|
@ -3,3 +3,4 @@ gridmode = false
|
|||
physics = basicphysics
|
||||
storage_plugin = "OpenSim.DataStore.NullStorage.dll"
|
||||
standalone_authenticate = false
|
||||
standalone_welcome = "Welcome to OpenSim"
|
Loading…
Reference in New Issue