diff options
author | Dev Random | 2014-03-28 21:41:09 -0400 |
---|---|---|
committer | Michael Cerquoni | 2014-03-29 00:59:15 -0400 |
commit | 635f3f77abcc159ceb2848496a34efdcd8b296a9 (patch) | |
tree | 4832a6718ff578e69d39299458e74a870cd3893f /OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |
parent | Removed default timeout when starting scripts after Load OAR (diff) | |
download | opensim-SC_OLD-635f3f77abcc159ceb2848496a34efdcd8b296a9.zip opensim-SC_OLD-635f3f77abcc159ceb2848496a34efdcd8b296a9.tar.gz opensim-SC_OLD-635f3f77abcc159ceb2848496a34efdcd8b296a9.tar.bz2 opensim-SC_OLD-635f3f77abcc159ceb2848496a34efdcd8b296a9.tar.xz |
Console command to change Estate owner
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index cb9ad4a..9e6d0fc 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -40,6 +40,7 @@ using OpenMetaverse; | |||
40 | using OpenSim.Framework; | 40 | using OpenSim.Framework; |
41 | using OpenSim.Region.Framework.Interfaces; | 41 | using OpenSim.Region.Framework.Interfaces; |
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Services.Interfaces; | ||
43 | using RegionFlags = OpenMetaverse.RegionFlags; | 44 | using RegionFlags = OpenMetaverse.RegionFlags; |
44 | 45 | ||
45 | namespace OpenSim.Region.CoreModules.World.Estate | 46 | namespace OpenSim.Region.CoreModules.World.Estate |
@@ -1202,6 +1203,30 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1202 | sendRegionInfoPacketToAll(); | 1203 | sendRegionInfoPacketToAll(); |
1203 | } | 1204 | } |
1204 | 1205 | ||
1206 | public string setEstateOwner(int estateID, UserAccount account) | ||
1207 | { | ||
1208 | string response; | ||
1209 | |||
1210 | // get the current settings from DB | ||
1211 | EstateSettings dbSettings = Scene.EstateDataService.LoadEstateSettings(estateID); | ||
1212 | if(account.PrincipalID != dbSettings.EstateOwner) { | ||
1213 | dbSettings.EstateOwner = account.PrincipalID; | ||
1214 | dbSettings.Save(); | ||
1215 | response = String.Format("Estate owner changed to {0} ({1} {2})", account.PrincipalID, account.FirstName, account.LastName); | ||
1216 | |||
1217 | // make sure there's a log entry to document the change | ||
1218 | m_log.InfoFormat("[ESTATE]: Estate Owner for {0} changed to {1} ({2} {3})", dbSettings.EstateName, | ||
1219 | account.PrincipalID, account.FirstName, account.LastName); | ||
1220 | |||
1221 | TriggerEstateInfoChange(); | ||
1222 | } | ||
1223 | else | ||
1224 | { | ||
1225 | response = String.Format("Estate already belongs to {0} ({1} {2})", account.PrincipalID, account.FirstName, account.LastName); | ||
1226 | } | ||
1227 | return response; | ||
1228 | } | ||
1229 | |||
1205 | #endregion | 1230 | #endregion |
1206 | 1231 | ||
1207 | private void EventManager_OnNewClient(IClientAPI client) | 1232 | private void EventManager_OnNewClient(IClientAPI client) |