diff options
Profile Updates
Update basic profile to use the replaceable interface, making configuration less error-prone. Add support to query avatar's home user account and profile service for regions usng the updated OpenProfileModule with Hypergrid.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index dee0ad4..eb1e4b5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | |||
@@ -43,7 +43,7 @@ using OpenSim.Services.Interfaces; | |||
43 | namespace OpenSim.Region.CoreModules.Avatar.Profile | 43 | namespace OpenSim.Region.CoreModules.Avatar.Profile |
44 | { | 44 | { |
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] |
46 | public class BasicProfileModule : ISharedRegionModule | 46 | public class BasicProfileModule : IProfileModule, ISharedRegionModule |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
@@ -57,6 +57,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
57 | 57 | ||
58 | public void Initialise(IConfigSource config) | 58 | public void Initialise(IConfigSource config) |
59 | { | 59 | { |
60 | // This can be reduced later as the loader will determine | ||
61 | // whether we are needed | ||
60 | if (config.Configs["Profile"] != null) | 62 | if (config.Configs["Profile"] != null) |
61 | { | 63 | { |
62 | if (config.Configs["Profile"].GetString("Module", string.Empty) != "BasicProfileModule") | 64 | if (config.Configs["Profile"].GetString("Module", string.Empty) != "BasicProfileModule") |
@@ -65,14 +67,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
65 | 67 | ||
66 | m_log.DebugFormat("[PROFILE MODULE]: Basic Profile Module enabled"); | 68 | m_log.DebugFormat("[PROFILE MODULE]: Basic Profile Module enabled"); |
67 | m_Enabled = true; | 69 | m_Enabled = true; |
68 | |||
69 | } | 70 | } |
70 | 71 | ||
71 | public void AddRegion(Scene scene) | 72 | public void AddRegion(Scene scene) |
72 | { | 73 | { |
73 | if (!m_Enabled) | 74 | if (!m_Enabled) |
74 | return; | 75 | return; |
75 | 76 | ||
76 | lock (m_Scenes) | 77 | lock (m_Scenes) |
77 | { | 78 | { |
78 | if (!m_Scenes.Contains(scene)) | 79 | if (!m_Scenes.Contains(scene)) |
@@ -80,6 +81,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
80 | m_Scenes.Add(scene); | 81 | m_Scenes.Add(scene); |
81 | // Hook up events | 82 | // Hook up events |
82 | scene.EventManager.OnNewClient += OnNewClient; | 83 | scene.EventManager.OnNewClient += OnNewClient; |
84 | scene.RegisterModuleInterface<IProfileModule>(this); | ||
83 | } | 85 | } |
84 | } | 86 | } |
85 | } | 87 | } |
@@ -116,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
116 | 118 | ||
117 | public Type ReplaceableInterface | 119 | public Type ReplaceableInterface |
118 | { | 120 | { |
119 | get { return null; } | 121 | get { return typeof(IProfileModule); } |
120 | } | 122 | } |
121 | 123 | ||
122 | #endregion | 124 | #endregion |
@@ -170,4 +172,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
170 | } | 172 | } |
171 | 173 | ||
172 | } | 174 | } |
173 | } \ No newline at end of file | 175 | } |