diff options
author | Dev Random | 2014-04-19 18:07:21 -0400 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-04-23 23:29:17 +0100 |
commit | 7180690a144dcb190b317ed28175c479c19c8a4a (patch) | |
tree | 4362b40afcb62697b99ef445f0b095e3001b636f | |
parent | Add Dev Random to CONTRIBUTORS.txt, thanks for the patches! (diff) | |
download | opensim-SC-7180690a144dcb190b317ed28175c479c19c8a4a.zip opensim-SC-7180690a144dcb190b317ed28175c479c19c8a4a.tar.gz opensim-SC-7180690a144dcb190b317ed28175c479c19c8a4a.tar.bz2 opensim-SC-7180690a144dcb190b317ed28175c479c19c8a4a.tar.xz |
Show Group name when land is group-owned
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index fa5bfd6..ddea5b0 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -75,7 +75,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
75 | 75 | ||
76 | private LandChannel landChannel; | 76 | private LandChannel landChannel; |
77 | private Scene m_scene; | 77 | private Scene m_scene; |
78 | 78 | ||
79 | protected IGroupsModule m_groupManager; | ||
79 | protected IUserManagement m_userManager; | 80 | protected IUserManagement m_userManager; |
80 | protected IPrimCountModule m_primCountModule; | 81 | protected IPrimCountModule m_primCountModule; |
81 | protected IDialogModule m_Dialog; | 82 | protected IDialogModule m_Dialog; |
@@ -150,9 +151,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
150 | 151 | ||
151 | public void RegionLoaded(Scene scene) | 152 | public void RegionLoaded(Scene scene) |
152 | { | 153 | { |
153 | m_userManager = m_scene.RequestModuleInterface<IUserManagement>(); | 154 | m_userManager = m_scene.RequestModuleInterface<IUserManagement>(); |
154 | m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>(); | 155 | m_groupManager = m_scene.RequestModuleInterface<IGroupsModule>(); |
155 | m_Dialog = m_scene.RequestModuleInterface<IDialogModule>(); | 156 | m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>(); |
157 | m_Dialog = m_scene.RequestModuleInterface<IDialogModule>(); | ||
156 | } | 158 | } |
157 | 159 | ||
158 | public void RemoveRegion(Scene scene) | 160 | public void RemoveRegion(Scene scene) |
@@ -2096,8 +2098,18 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2096 | foreach (ILandObject lo in m_landList.Values) | 2098 | foreach (ILandObject lo in m_landList.Values) |
2097 | { | 2099 | { |
2098 | LandData ld = lo.LandData; | 2100 | LandData ld = lo.LandData; |
2101 | string ownerName; | ||
2102 | if (ld.IsGroupOwned) | ||
2103 | { | ||
2104 | GroupRecord rec = m_groupManager.GetGroupRecord(ld.GroupID); | ||
2105 | ownerName = (rec != null) ? rec.GroupName : "Unknown Group"; | ||
2106 | } | ||
2107 | else | ||
2108 | { | ||
2109 | ownerName = m_userManager.GetUserName(ld.OwnerID); | ||
2110 | } | ||
2099 | cdt.AddRow( | 2111 | cdt.AddRow( |
2100 | ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, m_userManager.GetUserName(ld.OwnerID)); | 2112 | ld.Name, ld.LocalID, ld.Area, lo.StartPoint, lo.EndPoint, ownerName); |
2101 | } | 2113 | } |
2102 | } | 2114 | } |
2103 | 2115 | ||
@@ -2118,8 +2130,17 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2118 | cdl.AddRow("Ends", lo.EndPoint); | 2130 | cdl.AddRow("Ends", lo.EndPoint); |
2119 | cdl.AddRow("AABB Min", ld.AABBMin); | 2131 | cdl.AddRow("AABB Min", ld.AABBMin); |
2120 | cdl.AddRow("AABB Max", ld.AABBMax); | 2132 | cdl.AddRow("AABB Max", ld.AABBMax); |
2121 | 2133 | string ownerName; | |
2122 | cdl.AddRow("Owner", m_userManager.GetUserName(ld.OwnerID)); | 2134 | if (ld.IsGroupOwned) |
2135 | { | ||
2136 | GroupRecord rec = m_groupManager.GetGroupRecord(ld.GroupID); | ||
2137 | ownerName = (rec != null) ? rec.GroupName : "Unknown Group"; | ||
2138 | } | ||
2139 | else | ||
2140 | { | ||
2141 | ownerName = m_userManager.GetUserName(ld.OwnerID); | ||
2142 | } | ||
2143 | cdl.AddRow("Owner", ownerName); | ||
2123 | cdl.AddRow("Is group owned?", ld.IsGroupOwned); | 2144 | cdl.AddRow("Is group owned?", ld.IsGroupOwned); |
2124 | cdl.AddRow("GroupID", ld.GroupID); | 2145 | cdl.AddRow("GroupID", ld.GroupID); |
2125 | 2146 | ||