aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2009-11-28 09:26:00 +0000
committerMelanie2009-11-28 09:26:00 +0000
commitd3e7a5293310651ea8adf28327e1cb9840bcf9d7 (patch)
tree044fde70d244eecd8c1344eb973aa8d6e86e249b /OpenSim/Region/CoreModules
parentReset update flag when a SOG is deleted. This fixes llDie(); (diff)
parentAdd some conditionals to references to the WorldComm module, so that the (diff)
downloadopensim-SC_OLD-d3e7a5293310651ea8adf28327e1cb9840bcf9d7.zip
opensim-SC_OLD-d3e7a5293310651ea8adf28327e1cb9840bcf9d7.tar.gz
opensim-SC_OLD-d3e7a5293310651ea8adf28327e1cb9840bcf9d7.tar.bz2
opensim-SC_OLD-d3e7a5293310651ea8adf28327e1cb9840bcf9d7.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs71
-rw-r--r--OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs9
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs17
4 files changed, 64 insertions, 40 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 273c128..7e1bed5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
98 /// <param name="godID">The person doing the kicking</param> 98 /// <param name="godID">The person doing the kicking</param>
99 /// <param name="sessionID">The session of the person doing the kicking</param> 99 /// <param name="sessionID">The session of the person doing the kicking</param>
100 /// <param name="agentID">the person that is being kicked</param> 100 /// <param name="agentID">the person that is being kicked</param>
101 /// <param name="kickflags">This isn't used apparently</param> 101 /// <param name="kickflags">Tells what to do to the user</param>
102 /// <param name="reason">The message to send to the user after it's been turned into a field</param> 102 /// <param name="reason">The message to send to the user after it's been turned into a field</param>
103 public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason) 103 public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason)
104 { 104 {
@@ -110,39 +110,56 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
110 { 110 {
111 if (m_scene.Permissions.IsGod(godID)) 111 if (m_scene.Permissions.IsGod(godID))
112 { 112 {
113 if (agentID == kickUserID) 113 if (kickflags == 0)
114 { 114 {
115 string reasonStr = Utils.BytesToString(reason); 115 if (agentID == kickUserID)
116 {
117 string reasonStr = Utils.BytesToString(reason);
116 118
117 m_scene.ForEachClient( 119 m_scene.ForEachClient(
118 delegate(IClientAPI controller) 120 delegate(IClientAPI controller)
119 { 121 {
120 if (controller.AgentId != godID) 122 if (controller.AgentId != godID)
121 controller.Kick(reasonStr); 123 controller.Kick(reasonStr);
122 } 124 }
123 ); 125 );
124 126
125 // This is a bit crude. It seems the client will be null before it actually stops the thread 127 // This is a bit crude. It seems the client will be null before it actually stops the thread
126 // The thread will kill itself eventually :/ 128 // The thread will kill itself eventually :/
127 // Is there another way to make sure *all* clients get this 'inter region' message? 129 // Is there another way to make sure *all* clients get this 'inter region' message?
128 m_scene.ForEachScenePresence( 130 m_scene.ForEachScenePresence(
129 delegate(ScenePresence p) 131 delegate(ScenePresence p)
130 {
131 if (p.UUID != godID && !p.IsChildAgent)
132 { 132 {
133 // Possibly this should really be p.Close() though that method doesn't send a close 133 if (p.UUID != godID && !p.IsChildAgent)
134 // to the client 134 {
135 p.ControllingClient.Close(); 135 // Possibly this should really be p.Close() though that method doesn't send a close
136 // to the client
137 p.ControllingClient.Close();
138 }
136 } 139 }
137 } 140 );
138 ); 141 }
142 else
143 {
144 m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent);
145
146 sp.ControllingClient.Kick(Utils.BytesToString(reason));
147 sp.ControllingClient.Close();
148 }
139 } 149 }
140 else 150
151 if (kickflags == 1)
141 { 152 {
142 m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent); 153 sp.AllowMovement = false;
143 154 m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
144 sp.ControllingClient.Kick(Utils.BytesToString(reason)); 155 m_dialogModule.SendAlertToUser(godID, "User Frozen");
145 sp.ControllingClient.Close(); 156 }
157
158 if (kickflags == 2)
159 {
160 sp.AllowMovement = true;
161 m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
162 m_dialogModule.SendAlertToUser(godID, "User Unfrozen");
146 } 163 }
147 } 164 }
148 else 165 else
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index d4a28e2..60df2e7 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -602,9 +602,12 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
602 ListenerInfo info = 602 ListenerInfo info =
603 ListenerInfo.FromData(localID, itemID, hostID, item); 603 ListenerInfo.FromData(localID, itemID, hostID, item);
604 604
605 if (!m_listeners.ContainsKey((int)item[2])) 605 lock (m_listeners)
606 m_listeners.Add((int)item[2], new List<ListenerInfo>()); 606 {
607 m_listeners[(int)item[2]].Add(info); 607 if (!m_listeners.ContainsKey((int)item[2]))
608 m_listeners.Add((int)item[2], new List<ListenerInfo>());
609 m_listeners[(int)item[2]].Add(info);
610 }
608 611
609 idx+=6; 612 idx+=6;
610 } 613 }
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 114dd13..3c0997c 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -453,6 +453,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
453 /// <summary> 453 /// <summary>
454 /// Resolve path to a working FileStream 454 /// Resolve path to a working FileStream
455 /// </summary> 455 /// </summary>
456 /// <param name="path"></param>
457 /// <returns></returns>
456 private Stream GetStream(string path) 458 private Stream GetStream(string path)
457 { 459 {
458 if (File.Exists(path)) 460 if (File.Exists(path))
@@ -499,8 +501,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
499 WebResponse response = request.GetResponse(); 501 WebResponse response = request.GetResponse();
500 Stream file = response.GetResponseStream(); 502 Stream file = response.GetResponseStream();
501 503
502 if (response.ContentType != "application/x-oar") 504 // justincc: gonna ignore the content type for now and just try anything
503 throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); 505 //if (response.ContentType != "application/x-oar")
506 // throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
504 507
505 if (response.ContentLength == 0) 508 if (response.ContentLength == 0)
506 throw new Exception(String.Format("{0} returned an empty file", uri.ToString())); 509 throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 013a0ef..c9b3071 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -800,30 +800,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
800 } 800 }
801 801
802 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers) 802 protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers)
803 { 803 {
804 bool permission = false;
805
806 if (parcel.LandData.OwnerID == user) 804 if (parcel.LandData.OwnerID == user)
807 { 805 {
808 permission = true; 806 // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on
807 // the subsequent redundant checks when using lParcelMediaCommandList()
808 // See http://opensimulator.org/mantis/view.php?id=3999 for more details
809 return true;
809 } 810 }
810 811
811 if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers)) 812 if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
812 { 813 {
813 permission = true; 814 return true;
814 } 815 }
815 816
816 if (IsEstateManager(user)) 817 if (IsEstateManager(user))
817 { 818 {
818 permission = true; 819 return true;
819 } 820 }
820 821
821 if (IsAdministrator(user)) 822 if (IsAdministrator(user))
822 { 823 {
823 permission = true; 824 return true;
824 } 825 }
825 826
826 return permission; 827 return false;
827 } 828 }
828 829
829 protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers) 830 protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers)