diff options
Diffstat (limited to '')
21 files changed, 95 insertions, 150 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 1e9f2b5..aa5105e 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -756,7 +756,7 @@ namespace OpenSim.Groups | |||
756 | 756 | ||
757 | if (avatar != null) | 757 | if (avatar != null) |
758 | { | 758 | { |
759 | if (avatar.UserLevel < m_levelGroupCreate) | 759 | if (avatar.GodController.UserLevel < m_levelGroupCreate) |
760 | { | 760 | { |
761 | remoteClient.SendCreateGroupReply(UUID.Zero, false, String.Format("Insufficient permissions to create a group. Requires level {0}", m_levelGroupCreate)); | 761 | remoteClient.SendCreateGroupReply(UUID.Zero, false, String.Format("Insufficient permissions to create a group. Requires level {0}", m_levelGroupCreate)); |
762 | return UUID.Zero; | 762 | return UUID.Zero; |
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 03ead01..b9d64b1 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -89,7 +89,8 @@ namespace OpenSim.Framework | |||
89 | public Vector3 AtAxis; | 89 | public Vector3 AtAxis; |
90 | public Vector3 LeftAxis; | 90 | public Vector3 LeftAxis; |
91 | public Vector3 UpAxis; | 91 | public Vector3 UpAxis; |
92 | public int GodLevel; | 92 | //public int GodLevel; |
93 | public OSD GodData = new OSDMap(); | ||
93 | public bool ChangedGrid; | 94 | public bool ChangedGrid; |
94 | 95 | ||
95 | // This probably shouldn't be here | 96 | // This probably shouldn't be here |
@@ -117,7 +118,13 @@ namespace OpenSim.Framework | |||
117 | 118 | ||
118 | args["far"] = OSD.FromReal(Far); | 119 | args["far"] = OSD.FromReal(Far); |
119 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); | 120 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); |
120 | args["god_level"] = OSD.FromString(GodLevel.ToString()); | 121 | //args["god_level"] = OSD.FromString(GodLevel.ToString()); |
122 | args["god_data"] = GodData; | ||
123 | OSDMap g = (OSDMap)GodData; | ||
124 | // Set legacy value | ||
125 | // TODO: remove after 0.9 is superseded | ||
126 | if (g.ContainsKey("ViewerUiIsGod")) | ||
127 | args["god_level"] = g["ViewerUiIsGod"].AsBoolean() ? 200 : 0;; | ||
121 | 128 | ||
122 | if ((Throttles != null) && (Throttles.Length > 0)) | 129 | if ((Throttles != null) && (Throttles.Length > 0)) |
123 | args["throttles"] = OSD.FromBinary(Throttles); | 130 | args["throttles"] = OSD.FromBinary(Throttles); |
@@ -176,8 +183,10 @@ namespace OpenSim.Framework | |||
176 | if (args["changed_grid"] != null) | 183 | if (args["changed_grid"] != null) |
177 | ChangedGrid = args["changed_grid"].AsBoolean(); | 184 | ChangedGrid = args["changed_grid"].AsBoolean(); |
178 | 185 | ||
179 | if (args["god_level"] != null) | 186 | //if (args["god_level"] != null) |
180 | Int32.TryParse(args["god_level"].AsString(), out GodLevel); | 187 | // Int32.TryParse(args["god_level"].AsString(), out GodLevel); |
188 | if (args["god_data"] != null) | ||
189 | GodData = args["god_data"]; | ||
181 | 190 | ||
182 | if (args["far"] != null) | 191 | if (args["far"] != null) |
183 | Far = (float)(args["far"].AsReal()); | 192 | Far = (float)(args["far"].AsReal()); |
@@ -353,7 +362,8 @@ namespace OpenSim.Framework | |||
353 | public Quaternion BodyRotation; | 362 | public Quaternion BodyRotation; |
354 | public uint ControlFlags; | 363 | public uint ControlFlags; |
355 | public float EnergyLevel; | 364 | public float EnergyLevel; |
356 | public Byte GodLevel; | 365 | public OSD GodData = new OSDMap(); |
366 | //public Byte GodLevel; | ||
357 | public bool AlwaysRun; | 367 | public bool AlwaysRun; |
358 | public UUID PreyAgent; | 368 | public UUID PreyAgent; |
359 | public Byte AgentAccess; | 369 | public Byte AgentAccess; |
@@ -427,7 +437,11 @@ namespace OpenSim.Framework | |||
427 | args["control_flags"] = OSD.FromString(ControlFlags.ToString()); | 437 | args["control_flags"] = OSD.FromString(ControlFlags.ToString()); |
428 | 438 | ||
429 | args["energy_level"] = OSD.FromReal(EnergyLevel); | 439 | args["energy_level"] = OSD.FromReal(EnergyLevel); |
430 | args["god_level"] = OSD.FromString(GodLevel.ToString()); | 440 | //args["god_level"] = OSD.FromString(GodLevel.ToString()); |
441 | args["god_data"] = GodData; | ||
442 | OSDMap g = (OSDMap)GodData; | ||
443 | if (g.ContainsKey("ViewerUiIsGod")) | ||
444 | args["god_level"] = g["ViewerUiIsGod"].AsBoolean() ? 200 : 0;; | ||
431 | args["always_run"] = OSD.FromBoolean(AlwaysRun); | 445 | args["always_run"] = OSD.FromBoolean(AlwaysRun); |
432 | args["prey_agent"] = OSD.FromUUID(PreyAgent); | 446 | args["prey_agent"] = OSD.FromUUID(PreyAgent); |
433 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); | 447 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); |
@@ -605,8 +619,11 @@ namespace OpenSim.Framework | |||
605 | if (args["energy_level"] != null) | 619 | if (args["energy_level"] != null) |
606 | EnergyLevel = (float)(args["energy_level"].AsReal()); | 620 | EnergyLevel = (float)(args["energy_level"].AsReal()); |
607 | 621 | ||
608 | if (args["god_level"] != null) | 622 | //if (args["god_level"] != null) |
609 | Byte.TryParse(args["god_level"].AsString(), out GodLevel); | 623 | // Byte.TryParse(args["god_level"].AsString(), out GodLevel); |
624 | |||
625 | if (args["god_data"] != null) | ||
626 | GodData = args["god_data"]; | ||
610 | 627 | ||
611 | if (args["always_run"] != null) | 628 | if (args["always_run"] != null) |
612 | AlwaysRun = args["always_run"].AsBoolean(); | 629 | AlwaysRun = args["always_run"].AsBoolean(); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 8cb40e1..58b7b00 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -537,7 +537,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
537 | // check user level | 537 | // check user level |
538 | if (avatar != null) | 538 | if (avatar != null) |
539 | { | 539 | { |
540 | if (avatar.UserLevel < m_levelUpload) | 540 | if (avatar.GodController.UserLevel < m_levelUpload) |
541 | { | 541 | { |
542 | LLSDAssetUploadError resperror = new LLSDAssetUploadError(); | 542 | LLSDAssetUploadError resperror = new LLSDAssetUploadError(); |
543 | resperror.message = "Insufficient permissions to upload"; | 543 | resperror.message = "Insufficient permissions to upload"; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index dba2872..316956b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -11455,7 +11455,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11455 | ScenePresence p; | 11455 | ScenePresence p; |
11456 | if (scene.TryGetScenePresence(sender.AgentId, out p)) | 11456 | if (scene.TryGetScenePresence(sender.AgentId, out p)) |
11457 | { | 11457 | { |
11458 | if (p.GodLevel >= 200) | 11458 | if (p.GodController.GodLevel >= 200) |
11459 | { | 11459 | { |
11460 | groupProfileReply.GroupData.OpenEnrollment = true; | 11460 | groupProfileReply.GroupData.OpenEnrollment = true; |
11461 | groupProfileReply.GroupData.MembershipFee = 0; | 11461 | groupProfileReply.GroupData.MembershipFee = 0; |
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 89fdf09..7d9f3b3 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -255,7 +255,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
255 | // check user level | 255 | // check user level |
256 | if (avatar != null) | 256 | if (avatar != null) |
257 | { | 257 | { |
258 | if (avatar.UserLevel < m_levelUpload) | 258 | if (avatar.GodController.UserLevel < m_levelUpload) |
259 | { | 259 | { |
260 | remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); | 260 | remoteClient.SendAgentAlertMessage("Unable to upload asset. Insufficient permissions.", false); |
261 | return; | 261 | return; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index 53800bb..adf5c68 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -229,7 +229,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
229 | fromPos = avatar.AbsolutePosition; | 229 | fromPos = avatar.AbsolutePosition; |
230 | fromName = avatar.Name; | 230 | fromName = avatar.Name; |
231 | fromID = c.Sender.AgentId; | 231 | fromID = c.Sender.AgentId; |
232 | if (avatar.GodLevel >= 200) | 232 | if (avatar.GodController.GodLevel >= 200) |
233 | { // let gods speak to outside or things may get confusing | 233 | { // let gods speak to outside or things may get confusing |
234 | fromNamePrefix = m_adminPrefix; | 234 | fromNamePrefix = m_adminPrefix; |
235 | checkParcelHide = false; | 235 | checkParcelHide = false; |
@@ -305,7 +305,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
305 | { | 305 | { |
306 | if (checkParcelHide) | 306 | if (checkParcelHide) |
307 | { | 307 | { |
308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodLevel < 200) | 308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && presence.GodController.GodLevel < 200) |
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) | 311 | if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs index e5bf919..9843f2e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/CallingCardModule.cs | |||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
118 | // If we're in god mode, we reverse the meaning. Offer | 118 | // If we're in god mode, we reverse the meaning. Offer |
119 | // calling card becomes "Take a calling card" for that | 119 | // calling card becomes "Take a calling card" for that |
120 | // person, no matter if they agree or not. | 120 | // person, no matter if they agree or not. |
121 | if (sp.GodLevel >= 200) | 121 | if (sp.GodController.GodLevel >= 200) |
122 | { | 122 | { |
123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); | 123 | CreateCallingCard(client.AgentId, destID, UUID.Zero, true); |
124 | return; | 124 | return; |
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index ac05a6e..82154bc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | |||
@@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
141 | if (avatar == null) | 141 | if (avatar == null) |
142 | return; | 142 | return; |
143 | 143 | ||
144 | if (avatar.UserLevel < m_levelHGFriends) | 144 | if (avatar.GodController.UserLevel < m_levelHGFriends) |
145 | { | 145 | { |
146 | client.SendAgentAlertMessage("Unable to send friendship invitation to foreigner. Insufficient permissions.", false); | 146 | client.SendAgentAlertMessage("Unable to send friendship invitation to foreigner. Insufficient permissions.", false); |
147 | return; | 147 | return; |
@@ -844,4 +844,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
844 | return false; | 844 | return false; |
845 | } | 845 | } |
846 | } | 846 | } |
847 | } \ No newline at end of file | 847 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 8d3c10d..b7ae298 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
173 | 173 | ||
174 | sp.GrantGodlikePowers(token, godLike); | 174 | sp.GrantGodlikePowers(token, godLike); |
175 | 175 | ||
176 | if (godLike && sp.GodLevel < 200 && DialogModule != null) | 176 | if (godLike && sp.GodController.GodLevel < 200 && DialogModule != null) |
177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); | 177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
178 | } | 178 | } |
179 | 179 | ||
@@ -194,14 +194,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
194 | int godlevel = 200; | 194 | int godlevel = 200; |
195 | // update level so higher gods can kick lower ones | 195 | // update level so higher gods can kick lower ones |
196 | ScenePresence god = m_scene.GetScenePresence(godID); | 196 | ScenePresence god = m_scene.GetScenePresence(godID); |
197 | if(god != null && god.GodLevel > godlevel) | 197 | if(god != null && god.GodController.GodLevel > godlevel) |
198 | godlevel = god.GodLevel; | 198 | godlevel = god.GodController.GodLevel; |
199 | 199 | ||
200 | if(agentID == ALL_AGENTS) | 200 | if(agentID == ALL_AGENTS) |
201 | { | 201 | { |
202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) | 202 | m_scene.ForEachRootScenePresence(delegate(ScenePresence p) |
203 | { | 203 | { |
204 | if (p.UUID != godID && godlevel > p.GodLevel) | 204 | if (p.UUID != godID && godlevel > p.GodController.GodLevel) |
205 | doKickmodes(godID, p, kickflags, reason); | 205 | doKickmodes(godID, p, kickflags, reason); |
206 | }); | 206 | }); |
207 | return; | 207 | return; |
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
224 | return; | 224 | return; |
225 | } | 225 | } |
226 | 226 | ||
227 | if (godlevel <= sp.GodLevel) // no god wars | 227 | if (godlevel <= sp.GodController.GodLevel) // no god wars |
228 | return; | 228 | return; |
229 | 229 | ||
230 | if(sp.UUID == godID) | 230 | if(sp.UUID == godID) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index c517a30..bd95ff0 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
169 | 169 | ||
170 | GridInstantMessage m; | 170 | GridInstantMessage m; |
171 | 171 | ||
172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid))) | 172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodController.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid))) |
173 | { | 173 | { |
174 | m = new GridInstantMessage(scene, client.AgentId, | 174 | m = new GridInstantMessage(scene, client.AgentId, |
175 | client.FirstName+" "+client.LastName, targetid, | 175 | client.FirstName+" "+client.LastName, targetid, |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ebebfd0..d0e5d86 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -2077,7 +2077,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2077 | agentpos.Position = sp.AbsolutePosition; | 2077 | agentpos.Position = sp.AbsolutePosition; |
2078 | agentpos.Velocity = sp.Velocity; | 2078 | agentpos.Velocity = sp.Velocity; |
2079 | agentpos.RegionHandle = currentRegionHandler; | 2079 | agentpos.RegionHandle = currentRegionHandler; |
2080 | agentpos.GodLevel = sp.GodLevel; | 2080 | //agentpos.GodLevel = sp.GodLevel; |
2081 | agentpos.GodData = sp.GodController.State(); | ||
2081 | agentpos.Throttles = spClient.GetThrottlesPacked(1); | 2082 | agentpos.Throttles = spClient.GetThrottlesPacked(1); |
2082 | // agentpos.ChildrenCapSeeds = seeds; | 2083 | // agentpos.ChildrenCapSeeds = seeds; |
2083 | 2084 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 4ad500a..1ce6927 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
272 | { | 272 | { |
273 | // this user is going to another grid | 273 | // this user is going to another grid |
274 | // for local users, check if HyperGrid teleport is allowed, based on user level | 274 | // for local users, check if HyperGrid teleport is allowed, based on user level |
275 | if (Scene.UserManagementModule.IsLocalGridUser(sp.UUID) && sp.UserLevel < m_levelHGTeleport) | 275 | if (Scene.UserManagementModule.IsLocalGridUser(sp.UUID) && sp.GodController.UserLevel < m_levelHGTeleport) |
276 | { | 276 | { |
277 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel."); | 277 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel."); |
278 | reason = "Hypergrid teleport not allowed"; | 278 | reason = "Hypergrid teleport not allowed"; |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 63b8de0..3a8d6b7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1977,7 +1977,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1977 | ScenePresence SP; | 1977 | ScenePresence SP; |
1978 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP); | 1978 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out SP); |
1979 | List<SceneObjectGroup> returns = new List<SceneObjectGroup>(); | 1979 | List<SceneObjectGroup> returns = new List<SceneObjectGroup>(); |
1980 | if (SP.UserLevel != 0) | 1980 | if (SP.GodController.UserLevel != 0) |
1981 | { | 1981 | { |
1982 | if (flags == 0) //All parcels, scripted or not | 1982 | if (flags == 0) //All parcels, scripted or not |
1983 | { | 1983 | { |
@@ -2043,7 +2043,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2043 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager); | 2043 | ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out parcelManager); |
2044 | System.Threading.Timer Timer; | 2044 | System.Threading.Timer Timer; |
2045 | 2045 | ||
2046 | if (targetAvatar.UserLevel == 0) | 2046 | if (targetAvatar.GodController.UserLevel == 0) |
2047 | { | 2047 | { |
2048 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 2048 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
2049 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) | 2049 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 1a61771..02d0e02 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -547,7 +547,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
547 | { | 547 | { |
548 | ScenePresence sp = m_scene.GetScenePresence(user); | 548 | ScenePresence sp = m_scene.GetScenePresence(user); |
549 | if (sp != null) | 549 | if (sp != null) |
550 | return (sp.UserLevel >= 200); | 550 | return (sp.GodController.UserLevel >= 200); |
551 | 551 | ||
552 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user); | 552 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user); |
553 | if (account != null) | 553 | if (account != null) |
diff --git a/OpenSim/Region/Framework/Scenes/GodController.cs b/OpenSim/Region/Framework/Scenes/GodController.cs index a3d0344..a0feca8 100644 --- a/OpenSim/Region/Framework/Scenes/GodController.cs +++ b/OpenSim/Region/Framework/Scenes/GodController.cs | |||
@@ -199,6 +199,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
199 | public int UserLevel | 199 | public int UserLevel |
200 | { | 200 | { |
201 | get { return m_userLevel; } | 201 | get { return m_userLevel; } |
202 | set { m_userLevel = UserLevel; } | ||
202 | } | 203 | } |
203 | 204 | ||
204 | public int GodLevel | 205 | public int GodLevel |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a293c92..87c3049 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -316,8 +316,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
316 | public bool m_seeIntoBannedRegion = false; | 316 | public bool m_seeIntoBannedRegion = false; |
317 | public int MaxUndoCount = 5; | 317 | public int MaxUndoCount = 5; |
318 | 318 | ||
319 | public bool AutomaticGodsOption {get; private set; } | ||
320 | |||
321 | public bool SeeIntoRegion { get; set; } | 319 | public bool SeeIntoRegion { get; set; } |
322 | 320 | ||
323 | // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; | 321 | // Using this for RegionReady module to prevent LoginsDisabled from changing under our feet; |
@@ -1209,9 +1207,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1209 | 1207 | ||
1210 | #endregion Interest Management | 1208 | #endregion Interest Management |
1211 | 1209 | ||
1212 | AutomaticGodsOption = Util.GetConfigVarFromSections<bool>(config, "automatic_gods", | ||
1213 | new string[] { "Startup", "Permissions" }, true); | ||
1214 | |||
1215 | StatsReporter = new SimStatsReporter(this); | 1210 | StatsReporter = new SimStatsReporter(this); |
1216 | 1211 | ||
1217 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 1212 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 58af347..339f1b1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -501,21 +501,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
501 | get { return m_invulnerable; } | 501 | get { return m_invulnerable; } |
502 | } | 502 | } |
503 | 503 | ||
504 | private int m_userLevel; | 504 | public GodController GodController { get; private set; } |
505 | |||
506 | public int UserLevel | ||
507 | { | ||
508 | get { return m_userLevel; } | ||
509 | private set { m_userLevel = value; } | ||
510 | } | ||
511 | |||
512 | private int m_godLevel; | ||
513 | |||
514 | public int GodLevel | ||
515 | { | ||
516 | get { return m_godLevel; } | ||
517 | private set { m_godLevel = value; } | ||
518 | } | ||
519 | 505 | ||
520 | private ulong m_rootRegionHandle; | 506 | private ulong m_rootRegionHandle; |
521 | private Vector3 m_rootRegionPosition = new Vector3(); | 507 | private Vector3 m_rootRegionPosition = new Vector3(); |
@@ -1056,21 +1042,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1056 | 1042 | ||
1057 | #region Constructor(s) | 1043 | #region Constructor(s) |
1058 | 1044 | ||
1059 | private void SetAutoGod() | ||
1060 | { | ||
1061 | if(!isNPC && m_scene.Permissions.IsGod(m_uuid)) | ||
1062 | { | ||
1063 | m_godLevel = 200; | ||
1064 | if(m_godLevel < UserLevel) | ||
1065 | m_godLevel = UserLevel; | ||
1066 | else | ||
1067 | m_godLevel = 0; | ||
1068 | } | ||
1069 | } | ||
1070 | |||
1071 | public ScenePresence( | 1045 | public ScenePresence( |
1072 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 1046 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
1073 | { | 1047 | { |
1048 | GodController = new GodController(world, this); | ||
1049 | |||
1074 | m_scene = world; | 1050 | m_scene = world; |
1075 | AttachmentsSyncLock = new Object(); | 1051 | AttachmentsSyncLock = new Object(); |
1076 | AllowMovement = true; | 1052 | AllowMovement = true; |
@@ -1097,15 +1073,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1097 | m_userFlags = 0; | 1073 | m_userFlags = 0; |
1098 | 1074 | ||
1099 | if (account != null) | 1075 | if (account != null) |
1100 | UserLevel = account.UserLevel; | 1076 | GodController.UserLevel = account.UserLevel; |
1101 | |||
1102 | if(!isNPC && m_scene.AutomaticGodsOption) | ||
1103 | { | ||
1104 | if(m_scene.Permissions.IsGod(m_uuid)) | ||
1105 | m_godLevel = 200; | ||
1106 | if(m_godLevel < UserLevel) | ||
1107 | m_godLevel = UserLevel; | ||
1108 | } | ||
1109 | 1077 | ||
1110 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); | 1078 | // IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); |
1111 | // if (gm != null) | 1079 | // if (gm != null) |
@@ -2152,8 +2120,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2152 | 2120 | ||
2153 | if(!IsChildAgent && !isNPC) | 2121 | if(!IsChildAgent && !isNPC) |
2154 | 2122 | ||
2155 | ControllingClient.SendAdminResponse(UUID.Zero, (uint)GodLevel); | ||
2156 | |||
2157 | // start sending terrain patchs | 2123 | // start sending terrain patchs |
2158 | if (!gotCrossUpdate && !isNPC) | 2124 | if (!gotCrossUpdate && !isNPC) |
2159 | Scene.SendLayerData(ControllingClient); | 2125 | Scene.SendLayerData(ControllingClient); |
@@ -2226,7 +2192,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2226 | if (p == this) | 2192 | if (p == this) |
2227 | continue; | 2193 | continue; |
2228 | 2194 | ||
2229 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2195 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2230 | continue; | 2196 | continue; |
2231 | 2197 | ||
2232 | SendAppearanceToAgentNF(p); | 2198 | SendAppearanceToAgentNF(p); |
@@ -2276,7 +2242,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2276 | continue; | 2242 | continue; |
2277 | } | 2243 | } |
2278 | 2244 | ||
2279 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 2245 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
2280 | continue; | 2246 | continue; |
2281 | 2247 | ||
2282 | SendAttachmentsToAgentNF(p); | 2248 | SendAttachmentsToAgentNF(p); |
@@ -3892,7 +3858,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3892 | if (!remoteClient.IsActive) | 3858 | if (!remoteClient.IsActive) |
3893 | return; | 3859 | return; |
3894 | 3860 | ||
3895 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodLevel < 200) | 3861 | if (ParcelHideThisAvatar && p.currentParcelUUID != currentParcelUUID && p.GodController.GodLevel < 200) |
3896 | return; | 3862 | return; |
3897 | 3863 | ||
3898 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); | 3864 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); |
@@ -4002,7 +3968,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4002 | // get the avatar, then a kill if can't see it | 3968 | // get the avatar, then a kill if can't see it |
4003 | p.SendInitialAvatarDataToAgent(this); | 3969 | p.SendInitialAvatarDataToAgent(this); |
4004 | 3970 | ||
4005 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200) | 3971 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodController.GodLevel < 200) |
4006 | return; | 3972 | return; |
4007 | 3973 | ||
4008 | p.SendAppearanceToAgentNF(this); | 3974 | p.SendAppearanceToAgentNF(this); |
@@ -4050,7 +4016,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4050 | foreach (ScenePresence p in presences) | 4016 | foreach (ScenePresence p in presences) |
4051 | { | 4017 | { |
4052 | p.ControllingClient.SendAvatarDataImmediate(this); | 4018 | p.ControllingClient.SendAvatarDataImmediate(this); |
4053 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4019 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4054 | // either just kill the object | 4020 | // either just kill the object |
4055 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4021 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4056 | // or also attachments viewer may still know about | 4022 | // or also attachments viewer may still know about |
@@ -4063,7 +4029,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4063 | public void SendInitialAvatarDataToAgent(ScenePresence p) | 4029 | public void SendInitialAvatarDataToAgent(ScenePresence p) |
4064 | { | 4030 | { |
4065 | p.ControllingClient.SendAvatarDataImmediate(this); | 4031 | p.ControllingClient.SendAvatarDataImmediate(this); |
4066 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4032 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4067 | // either just kill the object | 4033 | // either just kill the object |
4068 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | 4034 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); |
4069 | // or also attachments viewer may still know about | 4035 | // or also attachments viewer may still know about |
@@ -4077,7 +4043,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4077 | public void SendAvatarDataToAgent(ScenePresence avatar) | 4043 | public void SendAvatarDataToAgent(ScenePresence avatar) |
4078 | { | 4044 | { |
4079 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); | 4045 | //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); |
4080 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4046 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4081 | return; | 4047 | return; |
4082 | avatar.ControllingClient.SendAvatarDataImmediate(this); | 4048 | avatar.ControllingClient.SendAvatarDataImmediate(this); |
4083 | } | 4049 | } |
@@ -4122,7 +4088,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4122 | { | 4088 | { |
4123 | // m_log.DebugFormat( | 4089 | // m_log.DebugFormat( |
4124 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); | 4090 | // "[SCENE PRESENCE]: Sending appearance data from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); |
4125 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodLevel < 200) | 4091 | if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && avatar.GodController.GodLevel < 200) |
4126 | return; | 4092 | return; |
4127 | SendAppearanceToAgentNF(avatar); | 4093 | SendAppearanceToAgentNF(avatar); |
4128 | } | 4094 | } |
@@ -4138,7 +4104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4138 | if (IsChildAgent || Animator == null) | 4104 | if (IsChildAgent || Animator == null) |
4139 | return; | 4105 | return; |
4140 | 4106 | ||
4141 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4107 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4142 | return; | 4108 | return; |
4143 | 4109 | ||
4144 | Animator.SendAnimPackToClient(p.ControllingClient); | 4110 | Animator.SendAnimPackToClient(p.ControllingClient); |
@@ -4149,7 +4115,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4149 | if (IsChildAgent) | 4115 | if (IsChildAgent) |
4150 | return; | 4116 | return; |
4151 | 4117 | ||
4152 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4118 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4153 | return; | 4119 | return; |
4154 | 4120 | ||
4155 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4121 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
@@ -4174,7 +4140,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4174 | 4140 | ||
4175 | m_scene.ForEachScenePresence(delegate(ScenePresence p) | 4141 | m_scene.ForEachScenePresence(delegate(ScenePresence p) |
4176 | { | 4142 | { |
4177 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4143 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
4178 | return; | 4144 | return; |
4179 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); | 4145 | p.ControllingClient.SendAnimations(animations, seqs, ControllingClient.AgentId, objectIDs); |
4180 | }); | 4146 | }); |
@@ -4287,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4287 | agentpos.Position = AbsolutePosition; | 4253 | agentpos.Position = AbsolutePosition; |
4288 | agentpos.Velocity = Velocity; | 4254 | agentpos.Velocity = Velocity; |
4289 | agentpos.RegionHandle = RegionHandle; | 4255 | agentpos.RegionHandle = RegionHandle; |
4290 | agentpos.GodLevel = GodLevel; | 4256 | agentpos.GodData = GodController.State(); |
4291 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); | 4257 | agentpos.Throttles = ControllingClient.GetThrottlesPacked(1); |
4292 | 4258 | ||
4293 | // Let's get this out of the update loop | 4259 | // Let's get this out of the update loop |
@@ -4536,23 +4502,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
4536 | /// </summary> | 4502 | /// </summary> |
4537 | public void GrantGodlikePowers(UUID token, bool godStatus) | 4503 | public void GrantGodlikePowers(UUID token, bool godStatus) |
4538 | { | 4504 | { |
4539 | // if(m_scene.AutomaticGodsOption) | 4505 | if (isNPC) |
4540 | // return; | 4506 | return; |
4541 | |||
4542 | int oldgodlevel = GodLevel; | ||
4543 | |||
4544 | if (godStatus && !isNPC && m_scene.Permissions.IsGod(UUID)) | ||
4545 | { | ||
4546 | GodLevel = 200; | ||
4547 | if(GodLevel < UserLevel) | ||
4548 | GodLevel = UserLevel; | ||
4549 | } | ||
4550 | else | ||
4551 | GodLevel = 0; | ||
4552 | 4507 | ||
4553 | ControllingClient.SendAdminResponse(token, (uint)GodLevel); | 4508 | bool success = GodController.RequestGodMode(godStatus); |
4554 | if(oldgodlevel != GodLevel) | 4509 | if (success && godStatus) |
4555 | parcelGodCheck(m_currentParcelUUID, GodLevel >= 200); | 4510 | parcelGodCheck(m_currentParcelUUID, GodController.GodLevel >= 200); |
4556 | } | 4511 | } |
4557 | 4512 | ||
4558 | #region Child Agent Updates | 4513 | #region Child Agent Updates |
@@ -4583,6 +4538,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4583 | if (!IsChildAgent) | 4538 | if (!IsChildAgent) |
4584 | return; | 4539 | return; |
4585 | 4540 | ||
4541 | GodController.SetState(cAgentData.GodData); | ||
4542 | |||
4586 | RegionHandle = cAgentData.RegionHandle; | 4543 | RegionHandle = cAgentData.RegionHandle; |
4587 | 4544 | ||
4588 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); | 4545 | //m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY); |
@@ -4597,15 +4554,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4597 | m_pos = cAgentData.Position + offset; | 4554 | m_pos = cAgentData.Position + offset; |
4598 | 4555 | ||
4599 | CameraPosition = cAgentData.Center + offset; | 4556 | CameraPosition = cAgentData.Center + offset; |
4600 | if(m_scene.AutomaticGodsOption) | ||
4601 | SetAutoGod(); | ||
4602 | else | ||
4603 | { | ||
4604 | if(cAgentData.GodLevel >= 200 && m_scene.Permissions.IsGod(m_uuid)) | ||
4605 | GodLevel = cAgentData.GodLevel; | ||
4606 | else | ||
4607 | GodLevel = 0; | ||
4608 | } | ||
4609 | 4557 | ||
4610 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) | 4558 | if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) |
4611 | { | 4559 | { |
@@ -4665,15 +4613,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4665 | cAgent.HeadRotation = m_headrotation; | 4613 | cAgent.HeadRotation = m_headrotation; |
4666 | cAgent.BodyRotation = Rotation; | 4614 | cAgent.BodyRotation = Rotation; |
4667 | cAgent.ControlFlags = (uint)m_AgentControlFlags; | 4615 | cAgent.ControlFlags = (uint)m_AgentControlFlags; |
4668 | if(m_scene.AutomaticGodsOption) | ||
4669 | SetAutoGod(); | ||
4670 | else | ||
4671 | { | ||
4672 | if (GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4673 | cAgent.GodLevel = (byte)GodLevel; | ||
4674 | else | ||
4675 | cAgent.GodLevel = (byte) 0; | ||
4676 | } | ||
4677 | 4616 | ||
4678 | cAgent.AlwaysRun = SetAlwaysRun; | 4617 | cAgent.AlwaysRun = SetAlwaysRun; |
4679 | 4618 | ||
@@ -4735,6 +4674,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4735 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", | 4674 | // "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()", |
4736 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); | 4675 | // Name, m_scene.RegionInfo.RegionName, m_callbackURI); |
4737 | 4676 | ||
4677 | GodController.SetState(cAgent.GodData); | ||
4678 | |||
4738 | m_pos = cAgent.Position; | 4679 | m_pos = cAgent.Position; |
4739 | m_velocity = cAgent.Velocity; | 4680 | m_velocity = cAgent.Velocity; |
4740 | CameraPosition = cAgent.Center; | 4681 | CameraPosition = cAgent.Center; |
@@ -4771,16 +4712,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4771 | Rotation = cAgent.BodyRotation; | 4712 | Rotation = cAgent.BodyRotation; |
4772 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; | 4713 | m_AgentControlFlags = (AgentManager.ControlFlags)cAgent.ControlFlags; |
4773 | 4714 | ||
4774 | if(m_scene.AutomaticGodsOption) | ||
4775 | SetAutoGod(); | ||
4776 | else | ||
4777 | { | ||
4778 | if (cAgent.GodLevel >= 200 && m_scene.Permissions.IsGod(cAgent.AgentID)) | ||
4779 | GodLevel = cAgent.GodLevel; | ||
4780 | else | ||
4781 | GodLevel = 0; | ||
4782 | } | ||
4783 | |||
4784 | SetAlwaysRun = cAgent.AlwaysRun; | 4715 | SetAlwaysRun = cAgent.AlwaysRun; |
4785 | 4716 | ||
4786 | Appearance = new AvatarAppearance(cAgent.Appearance); | 4717 | Appearance = new AvatarAppearance(cAgent.Appearance); |
@@ -5010,7 +4941,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5010 | RaiseCollisionScriptEvents(coldata); | 4941 | RaiseCollisionScriptEvents(coldata); |
5011 | 4942 | ||
5012 | // Gods do not take damage and Invulnerable is set depending on parcel/region flags | 4943 | // Gods do not take damage and Invulnerable is set depending on parcel/region flags |
5013 | if (Invulnerable || GodLevel > 0) | 4944 | if (Invulnerable || GodController.GodLevel > 0) |
5014 | return; | 4945 | return; |
5015 | 4946 | ||
5016 | // The following may be better in the ICombatModule | 4947 | // The following may be better in the ICombatModule |
@@ -5295,7 +5226,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5295 | if (p != this && sog.HasPrivateAttachmentPoint) | 5226 | if (p != this && sog.HasPrivateAttachmentPoint) |
5296 | return; | 5227 | return; |
5297 | 5228 | ||
5298 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5229 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5299 | return; | 5230 | return; |
5300 | 5231 | ||
5301 | SendTerseUpdateToAgentNF(p); | 5232 | SendTerseUpdateToAgentNF(p); |
@@ -5409,7 +5340,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5409 | if (p == this) | 5340 | if (p == this) |
5410 | continue; | 5341 | continue; |
5411 | 5342 | ||
5412 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5343 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5413 | continue; | 5344 | continue; |
5414 | 5345 | ||
5415 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); | 5346 | p.ControllingClient.SendEntityUpdate(rootpart, rootflag); |
@@ -5468,7 +5399,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5468 | if (p == this) | 5399 | if (p == this) |
5469 | continue; | 5400 | continue; |
5470 | 5401 | ||
5471 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5402 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5472 | continue; | 5403 | continue; |
5473 | 5404 | ||
5474 | p.ControllingClient.SendEntityUpdate(rootpart, flag); | 5405 | p.ControllingClient.SendEntityUpdate(rootpart, flag); |
@@ -5518,7 +5449,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5518 | if (p == this) | 5449 | if (p == this) |
5519 | continue; | 5450 | continue; |
5520 | 5451 | ||
5521 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5452 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5522 | continue; | 5453 | continue; |
5523 | 5454 | ||
5524 | p.ControllingClient.SendEntityUpdate(part, flag); | 5455 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -5559,7 +5490,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5559 | { | 5490 | { |
5560 | if (p == this) | 5491 | if (p == this) |
5561 | continue; | 5492 | continue; |
5562 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 5493 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
5563 | continue; | 5494 | continue; |
5564 | 5495 | ||
5565 | p.ControllingClient.SendEntityUpdate(part, flag); | 5496 | p.ControllingClient.SendEntityUpdate(part, flag); |
@@ -6197,7 +6128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6197 | // the TP point. This behaviour mimics agni. | 6128 | // the TP point. This behaviour mimics agni. |
6198 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && | 6129 | if (land.LandData.LandingType == (byte)LandingType.LandingPoint && |
6199 | land.LandData.UserLocation != Vector3.Zero && | 6130 | land.LandData.UserLocation != Vector3.Zero && |
6200 | GodLevel < 200 && | 6131 | GodController.GodLevel < 200 && |
6201 | ((land.LandData.OwnerID != m_uuid && | 6132 | ((land.LandData.OwnerID != m_uuid && |
6202 | !m_scene.Permissions.IsGod(m_uuid) && | 6133 | !m_scene.Permissions.IsGod(m_uuid) && |
6203 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || | 6134 | !m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(m_uuid)) || |
@@ -6222,7 +6153,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6222 | string reason; | 6153 | string reason; |
6223 | 6154 | ||
6224 | // dont mess with gods | 6155 | // dont mess with gods |
6225 | if(GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) | 6156 | if(GodController.GodLevel >= 200 || m_scene.Permissions.IsGod(m_uuid)) |
6226 | return true; | 6157 | return true; |
6227 | 6158 | ||
6228 | // respect region owner and managers | 6159 | // respect region owner and managers |
@@ -6570,7 +6501,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6570 | continue; | 6501 | continue; |
6571 | 6502 | ||
6572 | // those not on parcel dont see me | 6503 | // those not on parcel dont see me |
6573 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6504 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6574 | { | 6505 | { |
6575 | killsToSendto.Add(p); // they dont see me | 6506 | killsToSendto.Add(p); // they dont see me |
6576 | } | 6507 | } |
@@ -6596,9 +6527,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
6596 | // only those on previus parcel need receive kills | 6527 | // only those on previus parcel need receive kills |
6597 | if (previusParcelID == p.currentParcelUUID) | 6528 | if (previusParcelID == p.currentParcelUUID) |
6598 | { | 6529 | { |
6599 | if(p.GodLevel < 200) | 6530 | if(p.GodController.GodLevel < 200) |
6600 | killsToSendto.Add(p); // they dont see me | 6531 | killsToSendto.Add(p); // they dont see me |
6601 | if(GodLevel < 200) | 6532 | if(GodController.GodLevel < 200) |
6602 | killsToSendme.Add(p); // i dont see them | 6533 | killsToSendme.Add(p); // i dont see them |
6603 | } | 6534 | } |
6604 | // only those on new parcel need see | 6535 | // only those on new parcel need see |
@@ -6620,7 +6551,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6620 | continue; | 6551 | continue; |
6621 | 6552 | ||
6622 | // those not on new parcel dont see me | 6553 | // those not on new parcel dont see me |
6623 | if (currentParcelID != p.currentParcelUUID && p.GodLevel < 200) | 6554 | if (currentParcelID != p.currentParcelUUID && p.GodController.GodLevel < 200) |
6624 | { | 6555 | { |
6625 | killsToSendto.Add(p); // they dont see me | 6556 | killsToSendto.Add(p); // they dont see me |
6626 | } | 6557 | } |
@@ -6646,7 +6577,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6646 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | 6577 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) |
6647 | continue; | 6578 | continue; |
6648 | // only those old parcel need kills | 6579 | // only those old parcel need kills |
6649 | if (previusParcelID == p.currentParcelUUID && GodLevel < 200) | 6580 | if (previusParcelID == p.currentParcelUUID && GodController.GodLevel < 200) |
6650 | { | 6581 | { |
6651 | killsToSendme.Add(p); // i dont see them | 6582 | killsToSendme.Add(p); // i dont see them |
6652 | } | 6583 | } |
@@ -6709,7 +6640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
6709 | if (Scene.AttachmentsModule != null) | 6640 | if (Scene.AttachmentsModule != null) |
6710 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | 6641 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |
6711 | 6642 | ||
6712 | if (!ParcelHideThisAvatar || GodLevel >= 200) | 6643 | if (!ParcelHideThisAvatar || GodController.GodLevel >= 200) |
6713 | return; | 6644 | return; |
6714 | 6645 | ||
6715 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 6646 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index f0de7d4..d52a1d5 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -877,7 +877,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
877 | 877 | ||
878 | if (avatar != null) | 878 | if (avatar != null) |
879 | { | 879 | { |
880 | if (avatar.UserLevel < m_levelGroupCreate) | 880 | if (avatar.GodController.UserLevel < m_levelGroupCreate) |
881 | { | 881 | { |
882 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have insufficient permissions to create a group."); | 882 | remoteClient.SendCreateGroupReply(UUID.Zero, false, "You have insufficient permissions to create a group."); |
883 | return UUID.Zero; | 883 | return UUID.Zero; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9cb3cad..92d6808 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4977,7 +4977,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4977 | if (presence != null && presence.PresenceType != PresenceType.Npc) | 4977 | if (presence != null && presence.PresenceType != PresenceType.Npc) |
4978 | { | 4978 | { |
4979 | // agent must not be a god | 4979 | // agent must not be a god |
4980 | if (presence.UserLevel >= 200) return; | 4980 | if (presence.GodController.UserLevel >= 200) return; |
4981 | 4981 | ||
4982 | // agent must be over the owners land | 4982 | // agent must be over the owners land |
4983 | if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) | 4983 | if (m_host.OwnerID == World.LandChannel.GetLandObject(presence.AbsolutePosition).LandData.OwnerID) |
@@ -5029,7 +5029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5029 | else | 5029 | else |
5030 | { | 5030 | { |
5031 | // agent must not be a god | 5031 | // agent must not be a god |
5032 | if (presence.GodLevel >= 200) return; | 5032 | if (presence.GodController.GodLevel >= 200) return; |
5033 | 5033 | ||
5034 | // agent must be over the owners land | 5034 | // agent must be over the owners land |
5035 | ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); | 5035 | ILandObject agentLand = World.LandChannel.GetLandObject(presence.AbsolutePosition); |
@@ -5256,7 +5256,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5256 | return; | 5256 | return; |
5257 | 5257 | ||
5258 | // Pushee is in GodMode this pushing object isn't owned by them | 5258 | // Pushee is in GodMode this pushing object isn't owned by them |
5259 | if (avatar.GodLevel > 0 && m_host.OwnerID != targetID) | 5259 | if (avatar.GodController.GodLevel > 0 && m_host.OwnerID != targetID) |
5260 | return; | 5260 | return; |
5261 | 5261 | ||
5262 | pusheeav = avatar; | 5262 | pusheeav = avatar; |
@@ -6687,7 +6687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6687 | delegate (ScenePresence ssp) | 6687 | delegate (ScenePresence ssp) |
6688 | { | 6688 | { |
6689 | // Gods are not listed in SL | 6689 | // Gods are not listed in SL |
6690 | if (!ssp.IsDeleted && ssp.GodLevel == 0.0 && !ssp.IsChildAgent) | 6690 | if (!ssp.IsDeleted && ssp.GodController.GodLevel == 0.0 && !ssp.IsChildAgent) |
6691 | { | 6691 | { |
6692 | if (!regionWide) | 6692 | if (!regionWide) |
6693 | { | 6693 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index cec595d..49e70bc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -721,7 +721,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
721 | { | 721 | { |
722 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 722 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
723 | 723 | ||
724 | if (sp == null || sp.GodLevel < 200) | 724 | if (sp == null || sp.GodController.GodLevel < 200) |
725 | { | 725 | { |
726 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 726 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
727 | return 0; | 727 | return 0; |
@@ -768,7 +768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
768 | { | 768 | { |
769 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 769 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
770 | 770 | ||
771 | if (sp == null || sp.GodLevel < 200) | 771 | if (sp == null || sp.GodController.GodLevel < 200) |
772 | { | 772 | { |
773 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); | 773 | LSShoutError("lsSetWindlightScene can only be used by estate managers or owners."); |
774 | return; | 774 | return; |
@@ -799,7 +799,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
799 | { | 799 | { |
800 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); | 800 | ScenePresence sp = World.GetScenePresence(m_host.OwnerID); |
801 | 801 | ||
802 | if (sp == null || sp.GodLevel < 200) | 802 | if (sp == null || sp.GodController.GodLevel < 200) |
803 | { | 803 | { |
804 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); | 804 | LSShoutError("lsSetWindlightSceneTargeted can only be used by estate managers or owners."); |
805 | return 0; | 805 | return 0; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index d401ed8..c7e7f89 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -540,7 +540,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
540 | } | 540 | } |
541 | } | 541 | } |
542 | 542 | ||
543 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 543 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodController.GodLevel > 0.0) |
544 | return; | 544 | return; |
545 | 545 | ||
546 | // if the object the script is in is attached and the avatar is the owner | 546 | // if the object the script is in is attached and the avatar is the owner |