diff options
author | UbitUmarov | 2017-01-07 18:41:46 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-07 18:41:46 +0000 |
commit | effa32cfa4cc252e9d52d536af510b4e1e92337c (patch) | |
tree | 58696b3dc64598d9b17c7c9b2da80dd93e8db133 /OpenSim/Region/CoreModules | |
parent | rename same variables to make their meaning more clear (diff) | |
download | opensim-SC_OLD-effa32cfa4cc252e9d52d536af510b4e1e92337c.zip opensim-SC_OLD-effa32cfa4cc252e9d52d536af510b4e1e92337c.tar.gz opensim-SC_OLD-effa32cfa4cc252e9d52d536af510b4e1e92337c.tar.bz2 opensim-SC_OLD-effa32cfa4cc252e9d52d536af510b4e1e92337c.tar.xz |
replace godlevel compares by the new faster bool isViewerUIGod
Diffstat (limited to 'OpenSim/Region/CoreModules')
4 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index adf5c68..5579dd0 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.GodController.GodLevel >= 200) | 232 | if (avatar.isViewerUIGod) |
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.GodController.GodLevel < 200) | 308 | if (sourceParcelID != Presencecheck.LandData.GlobalID && !presence.isViewerUIGod) |
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 9843f2e..58fa42d 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.GodController.GodLevel >= 200) | 121 | if (sp.isViewerUIGod) |
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/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 8116b3c..9664ae5 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.GodController.GodLevel < 200 && DialogModule != null) | 176 | if (godLike && !sp.isViewerUIGod && DialogModule != null) |
177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); | 177 | DialogModule.SendAlertToUser(agentID, "Request for god powers denied"); |
178 | } | 178 | } |
179 | 179 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index bd95ff0..9c80d0a 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.GodController.GodLevel >= 200 && (!scene.Permissions.IsAdministrator(targetid))) | 172 | if (scene.Permissions.IsAdministrator(client.AgentId) && presence.isViewerUIGod && (!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, |