Skip to content

Commit

Permalink
Rework the Gloebit startup logic so its consistent with the other mon…
Browse files Browse the repository at this point in the history
…ey modules and allows more than one money module to be present. This will short-circuit some startup actions if the Gloebit module is not configured which is really more correct anyway. It shouldn't be trying to start at all in that case.
  • Loading branch information
mdickson committed Jul 20, 2023
1 parent cd76839 commit 4a1122e
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 227 deletions.
2 changes: 1 addition & 1 deletion OpenSim/Framework/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class VersionInfo
{
public const string VersionNumber = "0.9.2.2";
public const string AssemblyVersionNumber = "0.9.2.2";
public const string Release = "8593";
public const string Release = "8600";

public const Flavour VERSION_FLAVOUR = Flavour.Dev;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,24 +253,11 @@ private void ReadConfigAndPopulate()
{
// we are enabled by default

IConfig startupConfig = m_gConfig.Configs["Startup"];

if(startupConfig == null) // should not happen
return;

IConfig economyConfig = m_gConfig.Configs["Economy"];

// economymodule may be at startup or Economy (legacy)
string mmodule = startupConfig.GetString("economymodule","");
if(string.IsNullOrEmpty(mmodule))
{
if(economyConfig != null)
{
mmodule = economyConfig.GetString("economymodule", "");
if (String.IsNullOrEmpty(mmodule))
mmodule = economyConfig.GetString("EconomyModule", "");
}
}
var mmodule = economyConfig?.GetString("economymodule", "");
if (String.IsNullOrEmpty(mmodule))
mmodule = economyConfig?.GetString("EconomyModule", "");

if (!string.IsNullOrEmpty(mmodule) && mmodule != Name)
{
Expand Down
Loading

0 comments on commit 4a1122e

Please sign in to comment.