diff options
author | John Hurliman | 2010-01-12 10:27:21 -0800 |
---|---|---|
committer | John Hurliman | 2010-01-12 10:27:21 -0800 |
commit | a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5 (patch) | |
tree | bf12b759e693d6b99494dfa19fb23e13488dd977 | |
parent | Bug in llGetNumberOfPrims always returns to script when no clients are connec... (diff) | |
parent | Add the option to reject duplicate region names (diff) | |
download | opensim-SC-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.zip opensim-SC-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.gz opensim-SC-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.bz2 opensim-SC-a8b1a57cd11facdf2c5c583cfa766a44fe5f99c5.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
43 files changed, 1166 insertions, 447 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 9075f15..14ce682 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -60,21 +60,6 @@ namespace OpenSim.Client.Linden | |||
60 | m_port = port; | 60 | m_port = port; |
61 | } | 61 | } |
62 | 62 | ||
63 | protected bool RegionLoginsEnabled | ||
64 | { | ||
65 | get | ||
66 | { | ||
67 | if (m_firstScene != null) | ||
68 | { | ||
69 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
70 | } | ||
71 | else | ||
72 | { | ||
73 | return false; | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | |||
78 | protected List<Scene> m_scenes = new List<Scene>(); | 63 | protected List<Scene> m_scenes = new List<Scene>(); |
79 | protected Scene m_firstScene; | 64 | protected Scene m_firstScene; |
80 | 65 | ||
@@ -239,67 +224,53 @@ namespace OpenSim.Client.Linden | |||
239 | agentData.child = false; | 224 | agentData.child = false; |
240 | } | 225 | } |
241 | 226 | ||
242 | if (!RegionLoginsEnabled) | 227 | bool success = false; |
243 | { | 228 | string denyMess = ""; |
244 | m_log.InfoFormat( | ||
245 | "[CLIENT]: Denying access for user {0} {1} because region login is currently disabled", | ||
246 | agentData.firstname, agentData.lastname); | ||
247 | 229 | ||
248 | Hashtable respdata = new Hashtable(); | 230 | Scene scene; |
249 | respdata["success"] = "FALSE"; | 231 | if (TryGetRegion(regionHandle, out scene)) |
250 | respdata["reason"] = "region login currently disabled"; | ||
251 | resp.Value = respdata; | ||
252 | } | ||
253 | else | ||
254 | { | 232 | { |
255 | bool success = false; | 233 | if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) |
256 | string denyMess = ""; | 234 | { |
257 | 235 | denyMess = "User is banned from this region"; | |
258 | Scene scene; | 236 | m_log.InfoFormat( |
259 | if (TryGetRegion(regionHandle, out scene)) | 237 | "[CLIENT]: Denying access for user {0} {1} because user is banned", |
238 | agentData.firstname, agentData.lastname); | ||
239 | } | ||
240 | else | ||
260 | { | 241 | { |
261 | if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) | 242 | string reason; |
243 | if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) | ||
262 | { | 244 | { |
263 | denyMess = "User is banned from this region"; | 245 | success = true; |
264 | m_log.InfoFormat( | ||
265 | "[CLIENT]: Denying access for user {0} {1} because user is banned", | ||
266 | agentData.firstname, agentData.lastname); | ||
267 | } | 246 | } |
268 | else | 247 | else |
269 | { | 248 | { |
270 | string reason; | 249 | denyMess = String.Format("Login refused by region: {0}", reason); |
271 | if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) | 250 | m_log.InfoFormat( |
272 | { | 251 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", |
273 | success = true; | 252 | agentData.firstname, agentData.lastname); |
274 | } | ||
275 | else | ||
276 | { | ||
277 | denyMess = String.Format("Login refused by region: {0}", reason); | ||
278 | m_log.InfoFormat( | ||
279 | "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", | ||
280 | agentData.firstname, agentData.lastname); | ||
281 | } | ||
282 | } | 253 | } |
283 | |||
284 | } | ||
285 | else | ||
286 | { | ||
287 | denyMess = "Region not found"; | ||
288 | } | 254 | } |
289 | 255 | ||
290 | if (success) | 256 | } |
291 | { | 257 | else |
292 | Hashtable respdata = new Hashtable(); | 258 | { |
293 | respdata["success"] = "TRUE"; | 259 | denyMess = "Region not found"; |
294 | resp.Value = respdata; | 260 | } |
295 | } | 261 | |
296 | else | 262 | if (success) |
297 | { | 263 | { |
298 | Hashtable respdata = new Hashtable(); | 264 | Hashtable respdata = new Hashtable(); |
299 | respdata["success"] = "FALSE"; | 265 | respdata["success"] = "TRUE"; |
300 | respdata["reason"] = denyMess; | 266 | resp.Value = respdata; |
301 | resp.Value = respdata; | 267 | } |
302 | } | 268 | else |
269 | { | ||
270 | Hashtable respdata = new Hashtable(); | ||
271 | respdata["success"] = "FALSE"; | ||
272 | respdata["reason"] = denyMess; | ||
273 | resp.Value = respdata; | ||
303 | } | 274 | } |
304 | } | 275 | } |
305 | catch (Exception e) | 276 | catch (Exception e) |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs index 8047f74..e51eace 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs | |||
@@ -56,21 +56,6 @@ namespace OpenSim.Client.Linden | |||
56 | protected bool authenticate; | 56 | protected bool authenticate; |
57 | protected string welcomeMessage; | 57 | protected string welcomeMessage; |
58 | 58 | ||
59 | public bool RegionLoginsEnabled | ||
60 | { | ||
61 | get | ||
62 | { | ||
63 | if (m_firstScene != null) | ||
64 | { | ||
65 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
66 | } | ||
67 | else | ||
68 | { | ||
69 | return false; | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | protected LLStandaloneLoginService m_loginService; | 59 | protected LLStandaloneLoginService m_loginService; |
75 | 60 | ||
76 | #region IRegionModule Members | 61 | #region IRegionModule Members |
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs index 122110d..9ab043a 100644 --- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs +++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs | |||
@@ -202,20 +202,15 @@ namespace OpenSim.Client.Linden | |||
202 | agent.Appearance = new AvatarAppearance(agent.AgentID); | 202 | agent.Appearance = new AvatarAppearance(agent.AgentID); |
203 | } | 203 | } |
204 | 204 | ||
205 | if (m_regionsConnector.RegionLoginsEnabled) | 205 | string reason; |
206 | bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
207 | if (!success) | ||
206 | { | 208 | { |
207 | string reason; | 209 | response.ErrorReason = "key"; |
208 | bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | 210 | response.ErrorMessage = reason; |
209 | if (!success) | ||
210 | { | ||
211 | response.ErrorReason = "key"; | ||
212 | response.ErrorMessage = reason; | ||
213 | } | ||
214 | return success; | ||
215 | // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); | ||
216 | } | 211 | } |
217 | 212 | return success; | |
218 | return false; | 213 | // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); |
219 | } | 214 | } |
220 | 215 | ||
221 | public override void LogOffUser(UserProfileData theUser, string message) | 216 | public override void LogOffUser(UserProfileData theUser, string message) |
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index f84b296..3c98229 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1217,7 +1217,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1217 | // Need to translate to MXP somehow | 1217 | // Need to translate to MXP somehow |
1218 | } | 1218 | } |
1219 | 1219 | ||
1220 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 1220 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
1221 | { | 1221 | { |
1222 | // Need to translate to MXP somehow | 1222 | // Need to translate to MXP somehow |
1223 | } | 1223 | } |
@@ -1688,7 +1688,15 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1688 | } | 1688 | } |
1689 | 1689 | ||
1690 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1690 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1691 | { | 1691 | { |
1692 | } | ||
1693 | |||
1694 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1695 | { | ||
1696 | } | ||
1697 | |||
1698 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1699 | { | ||
1692 | } | 1700 | } |
1693 | } | 1701 | } |
1694 | } | 1702 | } |
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index e1eed9b..30d1575 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -760,7 +760,7 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
760 | throw new System.NotImplementedException(); | 760 | throw new System.NotImplementedException(); |
761 | } | 761 | } |
762 | 762 | ||
763 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 763 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
764 | { | 764 | { |
765 | throw new System.NotImplementedException(); | 765 | throw new System.NotImplementedException(); |
766 | } | 766 | } |
@@ -1177,7 +1177,15 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1179 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1180 | { | 1180 | { |
1181 | } | ||
1182 | |||
1183 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1184 | { | ||
1185 | } | ||
1186 | |||
1187 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1188 | { | ||
1181 | } | 1189 | } |
1182 | 1190 | ||
1183 | #endregion | 1191 | #endregion |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 7ca57b0..6a119bd 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -767,7 +767,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
767 | throw new System.NotImplementedException(); | 767 | throw new System.NotImplementedException(); |
768 | } | 768 | } |
769 | 769 | ||
770 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 770 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
771 | { | 771 | { |
772 | throw new System.NotImplementedException(); | 772 | throw new System.NotImplementedException(); |
773 | } | 773 | } |
@@ -1194,7 +1194,15 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1196 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1197 | { | 1197 | { |
1198 | } | ||
1199 | |||
1200 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1201 | { | ||
1202 | } | ||
1203 | |||
1204 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1205 | { | ||
1198 | } | 1206 | } |
1199 | } | 1207 | } |
1200 | } | 1208 | } |
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 60f0ba8..a274ae7 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | |||
@@ -388,12 +388,6 @@ namespace OpenSim.Framework.Communications.Tests | |||
388 | } | 388 | } |
389 | } | 389 | } |
390 | 390 | ||
391 | #region ILoginRegionsConnector Members | ||
392 | public bool RegionLoginsEnabled | ||
393 | { | ||
394 | get { return true; } | ||
395 | } | ||
396 | |||
397 | public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) | 391 | public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) |
398 | { | 392 | { |
399 | } | 393 | } |
@@ -454,8 +448,6 @@ namespace OpenSim.Framework.Communications.Tests | |||
454 | 448 | ||
455 | return null; | 449 | return null; |
456 | } | 450 | } |
457 | |||
458 | #endregion | ||
459 | } | 451 | } |
460 | } | 452 | } |
461 | } \ No newline at end of file | 453 | } |
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 632431f..5757061 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs | |||
@@ -36,10 +36,10 @@ namespace OpenSim.Framework | |||
36 | 36 | ||
37 | public enum EstateAccessCodex : uint | 37 | public enum EstateAccessCodex : uint |
38 | { | 38 | { |
39 | AccessOptions = 17, | 39 | AccessOptions = 1, |
40 | AllowedGroups = 18, | 40 | AllowedGroups = 2, |
41 | EstateBans = 20, | 41 | EstateBans = 4, |
42 | EstateManagers = 24 | 42 | EstateManagers = 8 |
43 | } | 43 | } |
44 | 44 | ||
45 | [Flags]public enum TeleportFlags : uint | 45 | [Flags]public enum TeleportFlags : uint |
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index deced98..b4b5808 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -300,6 +300,34 @@ namespace OpenSim.Framework | |||
300 | OnSave(this); | 300 | OnSave(this); |
301 | } | 301 | } |
302 | 302 | ||
303 | public void AddEstateUser(UUID avatarID) | ||
304 | { | ||
305 | if (avatarID == UUID.Zero) | ||
306 | return; | ||
307 | if (!l_EstateAccess.Contains(avatarID)) | ||
308 | l_EstateAccess.Add(avatarID); | ||
309 | } | ||
310 | |||
311 | public void RemoveEstateUser(UUID avatarID) | ||
312 | { | ||
313 | if (l_EstateAccess.Contains(avatarID)) | ||
314 | l_EstateAccess.Remove(avatarID); | ||
315 | } | ||
316 | |||
317 | public void AddEstateGroup(UUID avatarID) | ||
318 | { | ||
319 | if (avatarID == UUID.Zero) | ||
320 | return; | ||
321 | if (!l_EstateGroups.Contains(avatarID)) | ||
322 | l_EstateGroups.Add(avatarID); | ||
323 | } | ||
324 | |||
325 | public void RemoveEstateGroup(UUID avatarID) | ||
326 | { | ||
327 | if (l_EstateGroups.Contains(avatarID)) | ||
328 | l_EstateGroups.Remove(avatarID); | ||
329 | } | ||
330 | |||
303 | public void AddEstateManager(UUID avatarID) | 331 | public void AddEstateManager(UUID avatarID) |
304 | { | 332 | { |
305 | if (avatarID == UUID.Zero) | 333 | if (avatarID == UUID.Zero) |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index eb5b034..3489af1 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1271,7 +1271,7 @@ namespace OpenSim.Framework | |||
1271 | void SendHealth(float health); | 1271 | void SendHealth(float health); |
1272 | 1272 | ||
1273 | 1273 | ||
1274 | void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID); | 1274 | void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID); |
1275 | 1275 | ||
1276 | void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); | 1276 | void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); |
1277 | 1277 | ||
@@ -1446,7 +1446,12 @@ namespace OpenSim.Framework | |||
1446 | void SendUserInfoReply(bool imViaEmail, bool visible, string email); | 1446 | void SendUserInfoReply(bool imViaEmail, bool visible, string email); |
1447 | 1447 | ||
1448 | void SendUseCachedMuteList(); | 1448 | void SendUseCachedMuteList(); |
1449 | void SendMuteListUpdate(string filename); | 1449 | |
1450 | void SendMuteListUpdate(string filename); | ||
1451 | |||
1452 | void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals); | ||
1453 | |||
1454 | void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes); | ||
1450 | 1455 | ||
1451 | void KillEndDone(); | 1456 | void KillEndDone(); |
1452 | 1457 | ||
diff --git a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs index 2aee88e..5a155c1 100644 --- a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs +++ b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs | |||
@@ -32,7 +32,6 @@ namespace OpenSim.Framework | |||
32 | { | 32 | { |
33 | public interface ILoginServiceToRegionsConnector | 33 | public interface ILoginServiceToRegionsConnector |
34 | { | 34 | { |
35 | bool RegionLoginsEnabled { get; } | ||
36 | void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); | 35 | void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); |
37 | bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); | 36 | bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); |
38 | RegionInfo RequestClosestRegion(string region); | 37 | RegionInfo RequestClosestRegion(string region); |
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 7da4893..84cc05e 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs | |||
@@ -32,7 +32,7 @@ namespace OpenSim.Framework | |||
32 | { | 32 | { |
33 | public class MainServer | 33 | public class MainServer |
34 | { | 34 | { |
35 | private static BaseHttpServer instance; | 35 | private static BaseHttpServer instance = null; |
36 | private static Dictionary<uint, BaseHttpServer> m_Servers = | 36 | private static Dictionary<uint, BaseHttpServer> m_Servers = |
37 | new Dictionary<uint, BaseHttpServer>(); | 37 | new Dictionary<uint, BaseHttpServer>(); |
38 | 38 | ||
@@ -46,7 +46,7 @@ namespace OpenSim.Framework | |||
46 | { | 46 | { |
47 | if (port == 0) | 47 | if (port == 0) |
48 | return Instance; | 48 | return Instance; |
49 | if (port == Instance.Port) | 49 | if (instance != null && port == Instance.Port) |
50 | return Instance; | 50 | return Instance; |
51 | 51 | ||
52 | if (m_Servers.ContainsKey(port)) | 52 | if (m_Servers.ContainsKey(port)) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4..e09d730 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim | |||
53 | protected string m_shutdownCommandsFile; | 53 | protected string m_shutdownCommandsFile; |
54 | protected bool m_gui = false; | 54 | protected bool m_gui = false; |
55 | protected string m_consoleType = "local"; | 55 | protected string m_consoleType = "local"; |
56 | protected uint m_consolePort = 0; | ||
56 | 57 | ||
57 | private string m_timedScript = "disabled"; | 58 | private string m_timedScript = "disabled"; |
58 | private Timer m_scriptTimer; | 59 | private Timer m_scriptTimer; |
@@ -66,6 +67,7 @@ namespace OpenSim | |||
66 | base.ReadExtraConfigSettings(); | 67 | base.ReadExtraConfigSettings(); |
67 | 68 | ||
68 | IConfig startupConfig = m_config.Source.Configs["Startup"]; | 69 | IConfig startupConfig = m_config.Source.Configs["Startup"]; |
70 | IConfig networkConfig = m_config.Source.Configs["Network"]; | ||
69 | 71 | ||
70 | int stpMaxThreads = 15; | 72 | int stpMaxThreads = 15; |
71 | 73 | ||
@@ -79,6 +81,8 @@ namespace OpenSim | |||
79 | else | 81 | else |
80 | m_consoleType= startupConfig.GetString("console", String.Empty); | 82 | m_consoleType= startupConfig.GetString("console", String.Empty); |
81 | 83 | ||
84 | if (networkConfig != null) | ||
85 | m_consolePort = (uint)networkConfig.GetInt("console_port", 0); | ||
82 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); | 86 | m_timedScript = startupConfig.GetString("timer_Script", "disabled"); |
83 | if (m_logFileAppender != null) | 87 | if (m_logFileAppender != null) |
84 | { | 88 | { |
@@ -151,7 +155,16 @@ namespace OpenSim | |||
151 | base.StartupSpecific(); | 155 | base.StartupSpecific(); |
152 | 156 | ||
153 | if (m_console is RemoteConsole) | 157 | if (m_console is RemoteConsole) |
154 | ((RemoteConsole)m_console).SetServer(m_httpServer); | 158 | { |
159 | if (m_consolePort == 0) | ||
160 | { | ||
161 | ((RemoteConsole)m_console).SetServer(m_httpServer); | ||
162 | } | ||
163 | else | ||
164 | { | ||
165 | ((RemoteConsole)m_console).SetServer(MainServer.GetHttpServer(m_consolePort)); | ||
166 | } | ||
167 | } | ||
155 | 168 | ||
156 | //Run Startup Commands | 169 | //Run Startup Commands |
157 | if (String.IsNullOrEmpty(m_startupCommandsFile)) | 170 | if (String.IsNullOrEmpty(m_startupCommandsFile)) |
@@ -287,18 +300,6 @@ namespace OpenSim | |||
287 | "create region", | 300 | "create region", |
288 | "Create a new region", HandleCreateRegion); | 301 | "Create a new region", HandleCreateRegion); |
289 | 302 | ||
290 | m_console.Commands.AddCommand("region", false, "login enable", | ||
291 | "login enable", | ||
292 | "Enable logins to the simulator", HandleLoginEnable); | ||
293 | |||
294 | m_console.Commands.AddCommand("region", false, "login disable", | ||
295 | "login disable", | ||
296 | "Disable logins to the simulator", HandleLoginDisable); | ||
297 | |||
298 | m_console.Commands.AddCommand("region", false, "login status", | ||
299 | "login status", | ||
300 | "Display status of logins", HandleLoginStatus); | ||
301 | |||
302 | m_console.Commands.AddCommand("region", false, "restart", | 303 | m_console.Commands.AddCommand("region", false, "restart", |
303 | "restart", | 304 | "restart", |
304 | "Restart all sims in this instance", RunCommand); | 305 | "Restart all sims in this instance", RunCommand); |
@@ -559,42 +560,6 @@ namespace OpenSim | |||
559 | } | 560 | } |
560 | 561 | ||
561 | /// <summary> | 562 | /// <summary> |
562 | /// Enable logins | ||
563 | /// </summary> | ||
564 | /// <param name="module"></param> | ||
565 | /// <param name="cmd"></param> | ||
566 | private void HandleLoginEnable(string module, string[] cmd) | ||
567 | { | ||
568 | ProcessLogin(true); | ||
569 | } | ||
570 | |||
571 | |||
572 | /// <summary> | ||
573 | /// Disable logins | ||
574 | /// </summary> | ||
575 | /// <param name="module"></param> | ||
576 | /// <param name="cmd"></param> | ||
577 | private void HandleLoginDisable(string module, string[] cmd) | ||
578 | { | ||
579 | ProcessLogin(false); | ||
580 | } | ||
581 | |||
582 | /// <summary> | ||
583 | /// Log login status to the console | ||
584 | /// </summary> | ||
585 | /// <param name="module"></param> | ||
586 | /// <param name="cmd"></param> | ||
587 | private void HandleLoginStatus(string module, string[] cmd) | ||
588 | { | ||
589 | if (m_sceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled == false) | ||
590 | |||
591 | m_log.Info("[ Login ] Login are disabled "); | ||
592 | else | ||
593 | m_log.Info("[ Login ] Login are enabled"); | ||
594 | } | ||
595 | |||
596 | |||
597 | /// <summary> | ||
598 | /// Change and load configuration file data. | 563 | /// Change and load configuration file data. |
599 | /// </summary> | 564 | /// </summary> |
600 | /// <param name="module"></param> | 565 | /// <param name="module"></param> |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 391856b..cf2ab65 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -203,12 +203,6 @@ namespace OpenSim | |||
203 | plugin.PostInitialise(); | 203 | plugin.PostInitialise(); |
204 | } | 204 | } |
205 | 205 | ||
206 | // Only enable logins to the regions once we have completely finished starting up (apart from scripts) | ||
207 | if ((SceneManager.CurrentOrFirstScene != null) && (SceneManager.CurrentOrFirstScene.SceneGridService != null)) | ||
208 | { | ||
209 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
210 | } | ||
211 | |||
212 | AddPluginCommands(); | 206 | AddPluginCommands(); |
213 | } | 207 | } |
214 | 208 | ||
@@ -279,31 +273,6 @@ namespace OpenSim | |||
279 | } | 273 | } |
280 | 274 | ||
281 | /// <summary> | 275 | /// <summary> |
282 | /// Initialises the asset cache. This supports legacy configuration values | ||
283 | /// to ensure consistent operation, but values outside of that namespace | ||
284 | /// are handled by the more generic resolution mechanism provided by | ||
285 | /// the ResolveAssetServer virtual method. If extended resolution fails, | ||
286 | /// then the normal default action is taken. | ||
287 | /// Creation of the AssetCache is handled by ResolveAssetCache. This | ||
288 | /// function accepts a reference to the instantiated AssetServer and | ||
289 | /// returns an IAssetCache implementation, if possible. This is a virtual | ||
290 | /// method. | ||
291 | /// </summary> | ||
292 | public void ProcessLogin(bool LoginEnabled) | ||
293 | { | ||
294 | if (LoginEnabled) | ||
295 | { | ||
296 | m_log.Info("[LOGIN]: Login is now enabled."); | ||
297 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = true; | ||
298 | } | ||
299 | else | ||
300 | { | ||
301 | m_log.Info("[LOGIN]: Login is now disabled."); | ||
302 | SceneManager.CurrentOrFirstScene.SceneGridService.RegionLoginsEnabled = false; | ||
303 | } | ||
304 | } | ||
305 | |||
306 | /// <summary> | ||
307 | /// Execute the region creation process. This includes setting up scene infrastructure. | 276 | /// Execute the region creation process. This includes setting up scene infrastructure. |
308 | /// </summary> | 277 | /// </summary> |
309 | /// <param name="regionInfo"></param> | 278 | /// <param name="regionInfo"></param> |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7d90a68..515d0ea 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3912,7 +3912,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3912 | return false; | 3912 | return false; |
3913 | } | 3913 | } |
3914 | 3914 | ||
3915 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 3915 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
3916 | |||
3916 | { | 3917 | { |
3917 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 3918 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
3918 | packet.AgentData.TransactionID = UUID.Random(); | 3919 | packet.AgentData.TransactionID = UUID.Random(); |
@@ -3921,26 +3922,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3921 | packet.MethodData.Invoice = invoice; | 3922 | packet.MethodData.Invoice = invoice; |
3922 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); | 3923 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); |
3923 | 3924 | ||
3924 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; | 3925 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + Data.Length]; |
3925 | 3926 | ||
3926 | for (int i = 0; i < (6 + EstateManagers.Length); i++) | 3927 | for (int i = 0; i < (6 + Data.Length); i++) |
3927 | { | 3928 | { |
3928 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); | 3929 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); |
3929 | } | 3930 | } |
3930 | int j = 0; | 3931 | int j = 0; |
3931 | 3932 | ||
3932 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; | 3933 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
3933 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; | 3934 | returnblock[j].Parameter = Utils.StringToBytes(code.ToString()); j++; |
3935 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | ||
3934 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3936 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3935 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3937 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3936 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3938 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3937 | returnblock[j].Parameter = Utils.StringToBytes(EstateManagers.Length.ToString()); j++; | 3939 | |
3938 | for (int i = 0; i < EstateManagers.Length; i++) | 3940 | j = 2; // Agents |
3941 | if ((code & 2) != 0) | ||
3942 | j = 3; // Groups | ||
3943 | if ((code & 8) != 0) | ||
3944 | j = 5; // Managers | ||
3945 | |||
3946 | returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); | ||
3947 | j = 6; | ||
3948 | |||
3949 | for (int i = 0; i < Data.Length; i++) | ||
3939 | { | 3950 | { |
3940 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 3951 | returnblock[j].Parameter = Data[i].GetBytes(); j++; |
3941 | } | 3952 | } |
3942 | packet.ParamList = returnblock; | 3953 | packet.ParamList = returnblock; |
3943 | packet.Header.Reliable = false; | 3954 | packet.Header.Reliable = true; |
3944 | OutPacket(packet, ThrottleOutPacketType.Task); | 3955 | OutPacket(packet, ThrottleOutPacketType.Task); |
3945 | } | 3956 | } |
3946 | 3957 | ||
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs index 46ee3c0..0b54746 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs | |||
@@ -55,21 +55,6 @@ namespace OpenSim.Region.CoreModules.Hypergrid | |||
55 | 55 | ||
56 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode | 56 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode |
57 | 57 | ||
58 | public bool RegionLoginsEnabled | ||
59 | { | ||
60 | get | ||
61 | { | ||
62 | if (m_firstScene != null) | ||
63 | { | ||
64 | return m_firstScene.SceneGridService.RegionLoginsEnabled; | ||
65 | } | ||
66 | else | ||
67 | { | ||
68 | return false; | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 | |||
73 | protected HGLoginAuthService m_loginService; | 58 | protected HGLoginAuthService m_loginService; |
74 | 59 | ||
75 | #region IRegionModule Members | 60 | #region IRegionModule Members |
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index beb2307..ebc7f59 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -47,6 +47,7 @@ | |||
47 | <RegionModule id="LandServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Land.LandServiceInConnectorModule" /> | 47 | <RegionModule id="LandServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Land.LandServiceInConnectorModule" /> |
48 | <RegionModule id="NeighbourServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour.NeighbourServiceInConnectorModule" /> \ | 48 | <RegionModule id="NeighbourServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour.NeighbourServiceInConnectorModule" /> \ |
49 | <RegionModule id="HypergridServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid.HypergridServiceInConnectorModule" /> \ | 49 | <RegionModule id="HypergridServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid.HypergridServiceInConnectorModule" /> \ |
50 | <RegionModule id="AccessModule" type="OpenSim.Region.CoreModules.World.AccessModule" /> \ | ||
50 | 51 | ||
51 | </Extension> | 52 | </Extension> |
52 | 53 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 93cb60c..f9cd90f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | |||
@@ -696,8 +696,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
696 | public bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome) | 696 | public bool CheckUserAtEntry(UUID userID, UUID sessionID, out bool comingHome) |
697 | { | 697 | { |
698 | comingHome = false; | 698 | comingHome = false; |
699 | if (!m_aScene.SceneGridService.RegionLoginsEnabled) | ||
700 | return false; | ||
701 | 699 | ||
702 | CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(userID); | 700 | CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(userID); |
703 | if (uinfo != null) | 701 | if (uinfo != null) |
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs new file mode 100644 index 0000000..dfa8df6 --- /dev/null +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -0,0 +1,158 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Console; | ||
36 | using OpenSim.Framework.Communications.Cache; | ||
37 | using OpenSim.Region.Framework.Interfaces; | ||
38 | using OpenSim.Region.Framework.Scenes; | ||
39 | using OpenSim.Services.Interfaces; | ||
40 | |||
41 | namespace OpenSim.Region.CoreModules.World | ||
42 | { | ||
43 | public class AccessModule : ISharedRegionModule | ||
44 | { | ||
45 | private static readonly ILog m_log = | ||
46 | LogManager.GetLogger( | ||
47 | MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
49 | private List<Scene> m_SceneList = new List<Scene>(); | ||
50 | |||
51 | public void Initialise(IConfigSource config) | ||
52 | { | ||
53 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
54 | "login enable", | ||
55 | "login enable", | ||
56 | "Enable simulator logins", | ||
57 | String.Empty, | ||
58 | HandleLoginCommand); | ||
59 | |||
60 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
61 | "login disable", | ||
62 | "login disable", | ||
63 | "Disable simulator logins", | ||
64 | String.Empty, | ||
65 | HandleLoginCommand); | ||
66 | |||
67 | MainConsole.Instance.Commands.AddCommand("access", true, | ||
68 | "login status", | ||
69 | "login status", | ||
70 | "Show login status", | ||
71 | String.Empty, | ||
72 | HandleLoginCommand); | ||
73 | } | ||
74 | |||
75 | public void PostInitialise() | ||
76 | { | ||
77 | } | ||
78 | |||
79 | public void Close() | ||
80 | { | ||
81 | } | ||
82 | |||
83 | public string Name | ||
84 | { | ||
85 | get { return "AccessModule"; } | ||
86 | } | ||
87 | |||
88 | public Type ReplaceableInterface | ||
89 | { | ||
90 | get { return null; } | ||
91 | } | ||
92 | |||
93 | public void AddRegion(Scene scene) | ||
94 | { | ||
95 | if (!m_SceneList.Contains(scene)) | ||
96 | m_SceneList.Add(scene); | ||
97 | } | ||
98 | |||
99 | public void RemoveRegion(Scene scene) | ||
100 | { | ||
101 | m_SceneList.Remove(scene); | ||
102 | } | ||
103 | |||
104 | public void RegionLoaded(Scene scene) | ||
105 | { | ||
106 | } | ||
107 | |||
108 | public void HandleLoginCommand(string module, string[] cmd) | ||
109 | { | ||
110 | if ((Scene)MainConsole.Instance.ConsoleScene == null) | ||
111 | { | ||
112 | foreach (Scene s in m_SceneList) | ||
113 | { | ||
114 | if(!ProcessCommand(s, cmd)) | ||
115 | break; | ||
116 | } | ||
117 | } | ||
118 | else | ||
119 | { | ||
120 | ProcessCommand((Scene)MainConsole.Instance.ConsoleScene, cmd); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | bool ProcessCommand(Scene scene, string[] cmd) | ||
125 | { | ||
126 | if (cmd.Length < 2) | ||
127 | { | ||
128 | MainConsole.Instance.Output("Syntax: login enable|disable|status"); | ||
129 | return false; | ||
130 | } | ||
131 | |||
132 | switch (cmd[1]) | ||
133 | { | ||
134 | case "enable": | ||
135 | if (scene.LoginsDisabled) | ||
136 | MainConsole.Instance.Output(String.Format("Enabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
137 | scene.LoginsDisabled = false; | ||
138 | break; | ||
139 | case "disable": | ||
140 | if (!scene.LoginsDisabled) | ||
141 | MainConsole.Instance.Output(String.Format("Disabling logins for region {0}", scene.RegionInfo.RegionName)); | ||
142 | scene.LoginsDisabled = true; | ||
143 | break; | ||
144 | case "status": | ||
145 | if (scene.LoginsDisabled) | ||
146 | MainConsole.Instance.Output(String.Format("Login in {0} are disabled", scene.RegionInfo.RegionName)); | ||
147 | else | ||
148 | MainConsole.Instance.Output(String.Format("Login in {0} are enabled", scene.RegionInfo.RegionName)); | ||
149 | break; | ||
150 | default: | ||
151 | MainConsole.Instance.Output("Syntax: login enable|disable|status"); | ||
152 | return false; | ||
153 | } | ||
154 | |||
155 | return true; | ||
156 | } | ||
157 | } | ||
158 | } | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index b1dcb14..695cced 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -75,10 +75,21 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
75 | m_scene.RegionInfo.EstateSettings.AbuseEmail, | 75 | m_scene.RegionInfo.EstateSettings.AbuseEmail, |
76 | estateOwner); | 76 | estateOwner); |
77 | 77 | ||
78 | remote_client.SendEstateManagersList(invoice, | 78 | remote_client.SendEstateList(invoice, |
79 | (int)Constants.EstateAccessCodex.EstateManagers, | ||
79 | m_scene.RegionInfo.EstateSettings.EstateManagers, | 80 | m_scene.RegionInfo.EstateSettings.EstateManagers, |
80 | m_scene.RegionInfo.EstateSettings.EstateID); | 81 | m_scene.RegionInfo.EstateSettings.EstateID); |
81 | 82 | ||
83 | remote_client.SendEstateList(invoice, | ||
84 | (int)Constants.EstateAccessCodex.AccessOptions, | ||
85 | m_scene.RegionInfo.EstateSettings.EstateAccess, | ||
86 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
87 | |||
88 | remote_client.SendEstateList(invoice, | ||
89 | (int)Constants.EstateAccessCodex.AllowedGroups, | ||
90 | m_scene.RegionInfo.EstateSettings.EstateGroups, | ||
91 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
92 | |||
82 | remote_client.SendBannedUserList(invoice, | 93 | remote_client.SendBannedUserList(invoice, |
83 | m_scene.RegionInfo.EstateSettings.EstateBans, | 94 | m_scene.RegionInfo.EstateSettings.EstateBans, |
84 | m_scene.RegionInfo.EstateSettings.EstateID); | 95 | m_scene.RegionInfo.EstateSettings.EstateID); |
@@ -233,127 +244,176 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
233 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) | 244 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) |
234 | return; // never process owner | 245 | return; // never process owner |
235 | 246 | ||
236 | switch (estateAccessType) | 247 | if ((estateAccessType & 4) != 0) // User add |
237 | { | 248 | { |
238 | case 64: | 249 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) |
239 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | 250 | { |
240 | { | 251 | m_scene.RegionInfo.EstateSettings.AddEstateUser(user); |
241 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | 252 | m_scene.RegionInfo.EstateSettings.Save(); |
242 | 253 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | |
243 | bool alreadyInList = false; | 254 | } |
244 | 255 | else | |
245 | for (int i = 0; i < banlistcheck.Length; i++) | 256 | { |
246 | { | 257 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); |
247 | if (user == banlistcheck[i].BannedUserID) | 258 | } |
248 | { | ||
249 | alreadyInList = true; | ||
250 | break; | ||
251 | } | ||
252 | |||
253 | } | ||
254 | if (!alreadyInList) | ||
255 | { | ||
256 | 259 | ||
257 | EstateBan item = new EstateBan(); | 260 | } |
261 | if ((estateAccessType & 8) != 0) // User remove | ||
262 | { | ||
263 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
264 | { | ||
265 | m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | ||
266 | m_scene.RegionInfo.EstateSettings.Save(); | ||
258 | 267 | ||
259 | item.BannedUserID = user; | 268 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); |
260 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | 269 | } |
261 | item.BannedHostAddress = "0.0.0.0"; | 270 | else |
262 | item.BannedHostIPMask = "0.0.0.0"; | 271 | { |
272 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
273 | } | ||
274 | } | ||
275 | if ((estateAccessType & 16) != 0) // Group add | ||
276 | { | ||
277 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
278 | { | ||
279 | m_scene.RegionInfo.EstateSettings.AddEstateGroup(user); | ||
280 | m_scene.RegionInfo.EstateSettings.Save(); | ||
281 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); | ||
282 | } | ||
283 | else | ||
284 | { | ||
285 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
286 | } | ||
287 | } | ||
288 | if ((estateAccessType & 32) != 0) // Group remove | ||
289 | { | ||
290 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
291 | { | ||
292 | m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | ||
293 | m_scene.RegionInfo.EstateSettings.Save(); | ||
263 | 294 | ||
264 | m_scene.RegionInfo.EstateSettings.AddBan(item); | 295 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateGroups, m_scene.RegionInfo.EstateSettings.EstateID); |
265 | m_scene.RegionInfo.EstateSettings.Save(); | 296 | } |
297 | else | ||
298 | { | ||
299 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
300 | } | ||
301 | } | ||
302 | if ((estateAccessType & 64) != 0) // Ban add | ||
303 | { | ||
304 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
305 | { | ||
306 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
266 | 307 | ||
267 | ScenePresence s = m_scene.GetScenePresence(user); | 308 | bool alreadyInList = false; |
268 | if (s != null) | ||
269 | { | ||
270 | if (!s.IsChildAgent) | ||
271 | { | ||
272 | s.ControllingClient.SendTeleportLocationStart(); | ||
273 | m_scene.TeleportClientHome(user, s.ControllingClient); | ||
274 | } | ||
275 | } | ||
276 | 309 | ||
277 | } | 310 | for (int i = 0; i < banlistcheck.Length; i++) |
278 | else | 311 | { |
312 | if (user == banlistcheck[i].BannedUserID) | ||
279 | { | 313 | { |
280 | remote_client.SendAlertMessage("User is already on the region ban list"); | 314 | alreadyInList = true; |
315 | break; | ||
281 | } | 316 | } |
282 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 317 | |
283 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
284 | } | ||
285 | else | ||
286 | { | ||
287 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
288 | } | 318 | } |
289 | break; | 319 | if (!alreadyInList) |
290 | case 128: | ||
291 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
292 | { | 320 | { |
293 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
294 | 321 | ||
295 | bool alreadyInList = false; | 322 | EstateBan item = new EstateBan(); |
296 | EstateBan listitem = null; | 323 | |
324 | item.BannedUserID = user; | ||
325 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | ||
326 | item.BannedHostAddress = "0.0.0.0"; | ||
327 | item.BannedHostIPMask = "0.0.0.0"; | ||
297 | 328 | ||
298 | for (int i = 0; i < banlistcheck.Length; i++) | 329 | m_scene.RegionInfo.EstateSettings.AddBan(item); |
330 | m_scene.RegionInfo.EstateSettings.Save(); | ||
331 | |||
332 | ScenePresence s = m_scene.GetScenePresence(user); | ||
333 | if (s != null) | ||
299 | { | 334 | { |
300 | if (user == banlistcheck[i].BannedUserID) | 335 | if (!s.IsChildAgent) |
301 | { | 336 | { |
302 | alreadyInList = true; | 337 | s.ControllingClient.SendTeleportLocationStart(); |
303 | listitem = banlistcheck[i]; | 338 | m_scene.TeleportClientHome(user, s.ControllingClient); |
304 | break; | ||
305 | } | 339 | } |
306 | |||
307 | } | 340 | } |
308 | if (alreadyInList && listitem != null) | 341 | |
309 | { | ||
310 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | ||
311 | m_scene.RegionInfo.EstateSettings.Save(); | ||
312 | } | ||
313 | else | ||
314 | { | ||
315 | remote_client.SendAlertMessage("User is not on the region ban list"); | ||
316 | } | ||
317 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | ||
318 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
319 | } | 342 | } |
320 | else | 343 | else |
321 | { | 344 | { |
322 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 345 | remote_client.SendAlertMessage("User is already on the region ban list"); |
323 | } | 346 | } |
324 | break; | 347 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
325 | case 256: | 348 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); |
349 | } | ||
350 | else | ||
351 | { | ||
352 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
353 | } | ||
354 | } | ||
355 | if ((estateAccessType & 128) != 0) // Ban remove | ||
356 | { | ||
357 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
358 | { | ||
359 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
326 | 360 | ||
327 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 361 | bool alreadyInList = false; |
328 | { | 362 | EstateBan listitem = null; |
329 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | 363 | |
330 | m_scene.RegionInfo.EstateSettings.Save(); | 364 | for (int i = 0; i < banlistcheck.Length; i++) |
331 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
332 | } | ||
333 | else | ||
334 | { | 365 | { |
335 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 366 | if (user == banlistcheck[i].BannedUserID) |
336 | } | 367 | { |
368 | alreadyInList = true; | ||
369 | listitem = banlistcheck[i]; | ||
370 | break; | ||
371 | } | ||
337 | 372 | ||
338 | break; | 373 | } |
339 | case 512: | 374 | if (alreadyInList && listitem != null) |
340 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
341 | { | 375 | { |
342 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 376 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
343 | m_scene.RegionInfo.EstateSettings.Save(); | 377 | m_scene.RegionInfo.EstateSettings.Save(); |
344 | |||
345 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
346 | } | 378 | } |
347 | else | 379 | else |
348 | { | 380 | { |
349 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 381 | remote_client.SendAlertMessage("User is not on the region ban list"); |
350 | } | 382 | } |
351 | break; | 383 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
352 | 384 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | |
353 | default: | 385 | } |
386 | else | ||
387 | { | ||
388 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
389 | } | ||
390 | } | ||
391 | if ((estateAccessType & 256) != 0) // Manager add | ||
392 | { | ||
393 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
394 | { | ||
395 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | ||
396 | m_scene.RegionInfo.EstateSettings.Save(); | ||
397 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
398 | } | ||
399 | else | ||
400 | { | ||
401 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
402 | } | ||
403 | } | ||
404 | if ((estateAccessType & 512) != 0) // Manager remove | ||
405 | { | ||
406 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
407 | { | ||
408 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | ||
409 | m_scene.RegionInfo.EstateSettings.Save(); | ||
354 | 410 | ||
355 | m_log.ErrorFormat("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta: {0}", estateAccessType.ToString()); | 411 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); |
356 | break; | 412 | } |
413 | else | ||
414 | { | ||
415 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
416 | } | ||
357 | } | 417 | } |
358 | } | 418 | } |
359 | 419 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 7699aa2..1dfa1b1 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -879,7 +879,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
879 | { | 879 | { |
880 | } | 880 | } |
881 | 881 | ||
882 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 882 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
883 | { | 883 | { |
884 | } | 884 | } |
885 | 885 | ||
@@ -1133,7 +1133,15 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1135 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1136 | { | 1136 | { |
1137 | } | ||
1138 | |||
1139 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1140 | { | ||
1141 | } | ||
1142 | |||
1143 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1144 | { | ||
1137 | } | 1145 | } |
1138 | } | 1146 | } |
1139 | } | 1147 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index 5cdf191..d7fa316 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | |||
@@ -32,13 +32,29 @@ namespace OpenSim.Region.Framework.Interfaces | |||
32 | { | 32 | { |
33 | public delegate void ScriptCommand(UUID script, string id, string module, string command, string k); | 33 | public delegate void ScriptCommand(UUID script, string id, string module, string command, string k); |
34 | 34 | ||
35 | /// <summary> | ||
36 | /// Interface for communication between OpenSim modules and in-world scripts | ||
37 | /// </summary> | ||
38 | /// | ||
39 | /// See OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.modSendCommand() for information on receiving messages | ||
40 | /// from scripts in OpenSim modules. | ||
35 | public interface IScriptModuleComms | 41 | public interface IScriptModuleComms |
36 | { | 42 | { |
43 | /// <summary> | ||
44 | /// Modules can subscribe to this event to receive command invocations from in-world scripts | ||
45 | /// </summary> | ||
37 | event ScriptCommand OnScriptCommand; | 46 | event ScriptCommand OnScriptCommand; |
38 | 47 | ||
39 | void DispatchReply(UUID script, int code, string text, string k); | 48 | /// <summary> |
49 | /// Send a link_message event to an in-world script | ||
50 | /// </summary> | ||
51 | /// <param name="scriptId"></param> | ||
52 | /// <param name="code"></param> | ||
53 | /// <param name="text"></param> | ||
54 | /// <param name="key"></param> | ||
55 | void DispatchReply(UUID scriptId, int code, string text, string key); | ||
40 | 56 | ||
41 | // For use ONLY by the script API | 57 | // For use ONLY by the script API |
42 | void RaiseEvent(UUID script, string id, string module, string command, string k); | 58 | void RaiseEvent(UUID script, string id, string module, string command, string key); |
43 | } | 59 | } |
44 | } | 60 | } |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 753344d..399379e 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -183,12 +183,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
183 | 183 | ||
184 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | 184 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; |
185 | 185 | ||
186 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); | ||
187 | |||
188 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; | ||
189 | |||
190 | public delegate void ScriptNotAtRotTargetEvent(uint localID); | ||
191 | |||
192 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; | ||
193 | |||
186 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | 194 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); |
187 | 195 | ||
188 | public event ScriptColliding OnScriptColliderStart; | 196 | public event ScriptColliding OnScriptColliderStart; |
189 | public event ScriptColliding OnScriptColliding; | 197 | public event ScriptColliding OnScriptColliding; |
190 | public event ScriptColliding OnScriptCollidingEnd; | 198 | public event ScriptColliding OnScriptCollidingEnd; |
191 | 199 | ||
200 | public event ScriptColliding OnScriptLandColliderStart; | ||
201 | public event ScriptColliding OnScriptLandColliding; | ||
202 | public event ScriptColliding OnScriptLandColliderEnd; | ||
203 | |||
192 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); | 204 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); |
193 | public event OnMakeChildAgentDelegate OnMakeChildAgent; | 205 | public event OnMakeChildAgentDelegate OnMakeChildAgent; |
194 | 206 | ||
@@ -380,6 +392,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
380 | private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent; | 392 | private ScriptChangedEvent handlerScriptChangedEvent = null; //OnScriptChangedEvent; |
381 | private ScriptAtTargetEvent handlerScriptAtTargetEvent = null; | 393 | private ScriptAtTargetEvent handlerScriptAtTargetEvent = null; |
382 | private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null; | 394 | private ScriptNotAtTargetEvent handlerScriptNotAtTargetEvent = null; |
395 | private ScriptAtRotTargetEvent handlerScriptAtRotTargetEvent = null; | ||
396 | private ScriptNotAtRotTargetEvent handlerScriptNotAtRotTargetEvent = null; | ||
383 | private ClientMovement handlerClientMovement = null; //OnClientMovement; | 397 | private ClientMovement handlerClientMovement = null; //OnClientMovement; |
384 | private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError; | 398 | private OnPermissionErrorDelegate handlerPermissionError = null; //OnPermissionError; |
385 | private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; | 399 | private OnPluginConsoleDelegate handlerPluginConsole = null; //OnPluginConsole; |
@@ -439,6 +453,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
439 | private ScriptColliding handlerCollidingStart = null; | 453 | private ScriptColliding handlerCollidingStart = null; |
440 | private ScriptColliding handlerColliding = null; | 454 | private ScriptColliding handlerColliding = null; |
441 | private ScriptColliding handlerCollidingEnd = null; | 455 | private ScriptColliding handlerCollidingEnd = null; |
456 | private ScriptColliding handlerLandCollidingStart = null; | ||
457 | private ScriptColliding handlerLandColliding = null; | ||
458 | private ScriptColliding handlerLandCollidingEnd = null; | ||
442 | private GetScriptRunning handlerGetScriptRunning = null; | 459 | private GetScriptRunning handlerGetScriptRunning = null; |
443 | 460 | ||
444 | private SunLindenHour handlerCurrentTimeAsLindenSunHour = null; | 461 | private SunLindenHour handlerCurrentTimeAsLindenSunHour = null; |
@@ -844,6 +861,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
844 | } | 861 | } |
845 | } | 862 | } |
846 | 863 | ||
864 | public void TriggerAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion currentrot) | ||
865 | { | ||
866 | handlerScriptAtRotTargetEvent = OnScriptAtRotTargetEvent; | ||
867 | if (handlerScriptAtRotTargetEvent != null) | ||
868 | { | ||
869 | handlerScriptAtRotTargetEvent(localID, handle, targetrot, currentrot); | ||
870 | } | ||
871 | } | ||
872 | |||
873 | public void TriggerNotAtRotTargetEvent(uint localID) | ||
874 | { | ||
875 | handlerScriptNotAtRotTargetEvent = OnScriptNotAtRotTargetEvent; | ||
876 | if (handlerScriptNotAtRotTargetEvent != null) | ||
877 | { | ||
878 | handlerScriptNotAtRotTargetEvent(localID); | ||
879 | } | ||
880 | } | ||
881 | |||
847 | public void TriggerRequestChangeWaterHeight(float height) | 882 | public void TriggerRequestChangeWaterHeight(float height) |
848 | { | 883 | { |
849 | handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; | 884 | handlerRequestChangeWaterHeight = OnRequestChangeWaterHeight; |
@@ -1034,6 +1069,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1034 | handlerCollidingEnd(localId, colliders); | 1069 | handlerCollidingEnd(localId, colliders); |
1035 | } | 1070 | } |
1036 | 1071 | ||
1072 | public void TriggerScriptLandCollidingStart(uint localId, ColliderArgs colliders) | ||
1073 | { | ||
1074 | handlerLandCollidingStart = OnScriptLandColliderStart; | ||
1075 | if (handlerLandCollidingStart != null) | ||
1076 | handlerLandCollidingStart(localId, colliders); | ||
1077 | } | ||
1078 | |||
1079 | public void TriggerScriptLandColliding(uint localId, ColliderArgs colliders) | ||
1080 | { | ||
1081 | handlerLandColliding = OnScriptLandColliding; | ||
1082 | if (handlerLandColliding != null) | ||
1083 | handlerLandColliding(localId, colliders); | ||
1084 | } | ||
1085 | |||
1086 | public void TriggerScriptLandCollidingEnd(uint localId, ColliderArgs colliders) | ||
1087 | { | ||
1088 | handlerLandCollidingEnd = OnScriptLandColliderEnd; | ||
1089 | if (handlerLandCollidingEnd != null) | ||
1090 | handlerLandCollidingEnd(localId, colliders); | ||
1091 | } | ||
1092 | |||
1037 | public void TriggerSetRootAgentScene(UUID agentID, Scene scene) | 1093 | public void TriggerSetRootAgentScene(UUID agentID, Scene scene) |
1038 | { | 1094 | { |
1039 | handlerSetRootAgentScene = OnSetRootAgentScene; | 1095 | handlerSetRootAgentScene = OnSetRootAgentScene; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 764ac60..bc9301b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
144 | public CommunicationsManager CommsManager; | 144 | public CommunicationsManager CommsManager; |
145 | 145 | ||
146 | protected SceneCommunicationService m_sceneGridService; | 146 | protected SceneCommunicationService m_sceneGridService; |
147 | public bool loginsdisabled = true; | 147 | public bool LoginsDisabled = true; |
148 | 148 | ||
149 | public new float TimeDilation | 149 | public new float TimeDilation |
150 | { | 150 | { |
@@ -1275,15 +1275,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1275 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); | 1275 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); |
1276 | } | 1276 | } |
1277 | 1277 | ||
1278 | if (loginsdisabled && m_frame > 20) | 1278 | if (LoginsDisabled && m_frame == 20) |
1279 | { | 1279 | { |
1280 | // In 99.9% of cases it is a bad idea to manually force garbage collection. However, | 1280 | // In 99.9% of cases it is a bad idea to manually force garbage collection. However, |
1281 | // this is a rare case where we know we have just went through a long cycle of heap | 1281 | // this is a rare case where we know we have just went through a long cycle of heap |
1282 | // allocations, and there is no more work to be done until someone logs in | 1282 | // allocations, and there is no more work to be done until someone logs in |
1283 | GC.Collect(); | 1283 | GC.Collect(); |
1284 | 1284 | ||
1285 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); | 1285 | IConfig startupConfig = m_config.Configs["Startup"]; |
1286 | loginsdisabled = false; | 1286 | if (startupConfig == null || !startupConfig.GetBoolean("StartDisabled", false)) |
1287 | { | ||
1288 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); | ||
1289 | LoginsDisabled = false; | ||
1290 | } | ||
1287 | } | 1291 | } |
1288 | } | 1292 | } |
1289 | catch (NotImplementedException) | 1293 | catch (NotImplementedException) |
@@ -3348,7 +3352,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3348 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport | 3352 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport |
3349 | 3353 | ||
3350 | 3354 | ||
3351 | if (loginsdisabled) | 3355 | if (LoginsDisabled) |
3352 | { | 3356 | { |
3353 | reason = "Logins Disabled"; | 3357 | reason = "Logins Disabled"; |
3354 | return false; | 3358 | return false; |
@@ -3525,8 +3529,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
3525 | return false; | 3529 | return false; |
3526 | } | 3530 | } |
3527 | 3531 | ||
3532 | IGroupsModule groupsModule = | ||
3533 | RequestModuleInterface<IGroupsModule>(); | ||
3534 | |||
3535 | List<UUID> agentGroups = new List<UUID>(); | ||
3536 | |||
3537 | if (groupsModule != null) | ||
3538 | { | ||
3539 | GroupMembershipData[] GroupMembership = | ||
3540 | groupsModule.GetMembershipData(agent.AgentID); | ||
3541 | |||
3542 | for (int i = 0; i < GroupMembership.Length; i++) | ||
3543 | agentGroups.Add(GroupMembership[i].GroupID); | ||
3544 | } | ||
3545 | |||
3546 | bool groupAccess = false; | ||
3547 | UUID[] estateGroups = m_regInfo.EstateSettings.EstateGroups; | ||
3548 | |||
3549 | foreach (UUID group in estateGroups) | ||
3550 | { | ||
3551 | if (agentGroups.Contains(group)) | ||
3552 | { | ||
3553 | groupAccess = true; | ||
3554 | break; | ||
3555 | } | ||
3556 | } | ||
3557 | |||
3528 | if (!m_regInfo.EstateSettings.PublicAccess && | 3558 | if (!m_regInfo.EstateSettings.PublicAccess && |
3529 | !m_regInfo.EstateSettings.HasAccess(agent.AgentID)) | 3559 | !m_regInfo.EstateSettings.HasAccess(agent.AgentID) && |
3560 | !groupAccess) | ||
3530 | { | 3561 | { |
3531 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", | 3562 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the estate", |
3532 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); | 3563 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f49d072..6164368 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -65,13 +65,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
65 | 65 | ||
66 | protected List<UUID> m_agentsInTransit; | 66 | protected List<UUID> m_agentsInTransit; |
67 | 67 | ||
68 | public bool RegionLoginsEnabled | ||
69 | { | ||
70 | get { return m_regionLoginsEnabled; } | ||
71 | set { m_regionLoginsEnabled = value; } | ||
72 | } | ||
73 | private bool m_regionLoginsEnabled = false; | ||
74 | |||
75 | /// <summary> | 68 | /// <summary> |
76 | /// An agent is crossing into this region | 69 | /// An agent is crossing into this region |
77 | /// </summary> | 70 | /// </summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 34d8b49..ec41ac7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -57,6 +57,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
57 | land_collision_end = 4096, | 57 | land_collision_end = 4096, |
58 | land_collision_start = 8192, | 58 | land_collision_start = 8192, |
59 | at_target = 16384, | 59 | at_target = 16384, |
60 | at_rot_target = 16777216, | ||
60 | listen = 32768, | 61 | listen = 32768, |
61 | money = 65536, | 62 | money = 65536, |
62 | moving_end = 131072, | 63 | moving_end = 131072, |
@@ -81,6 +82,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
81 | public uint handle; | 82 | public uint handle; |
82 | } | 83 | } |
83 | 84 | ||
85 | struct scriptRotTarget | ||
86 | { | ||
87 | public Quaternion targetRot; | ||
88 | public float tolerance; | ||
89 | public uint handle; | ||
90 | } | ||
91 | |||
84 | public delegate void PrimCountTaintedDelegate(); | 92 | public delegate void PrimCountTaintedDelegate(); |
85 | 93 | ||
86 | /// <summary> | 94 | /// <summary> |
@@ -166,10 +174,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
166 | // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); | 174 | // private Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); |
167 | 175 | ||
168 | private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); | 176 | private Dictionary<uint, scriptPosTarget> m_targets = new Dictionary<uint, scriptPosTarget>(); |
177 | private Dictionary<uint, scriptRotTarget> m_rotTargets = new Dictionary<uint, scriptRotTarget>(); | ||
169 | 178 | ||
170 | private bool m_scriptListens_atTarget = false; | 179 | private bool m_scriptListens_atTarget = false; |
171 | private bool m_scriptListens_notAtTarget = false; | 180 | private bool m_scriptListens_notAtTarget = false; |
172 | 181 | ||
182 | private bool m_scriptListens_atRotTarget = false; | ||
183 | private bool m_scriptListens_notAtRotTarget = false; | ||
184 | |||
173 | internal Dictionary<UUID, string> m_savedScriptState = null; | 185 | internal Dictionary<UUID, string> m_savedScriptState = null; |
174 | 186 | ||
175 | #region Properties | 187 | #region Properties |
@@ -1262,6 +1274,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1262 | m_targets.Clear(); | 1274 | m_targets.Clear(); |
1263 | m_scene.RemoveGroupTarget(this); | 1275 | m_scene.RemoveGroupTarget(this); |
1264 | } | 1276 | } |
1277 | m_scriptListens_atRotTarget = ((aggregateScriptEvents & scriptEvents.at_rot_target) != 0); | ||
1278 | m_scriptListens_notAtRotTarget = ((aggregateScriptEvents & scriptEvents.not_at_rot_target) != 0); | ||
1279 | |||
1280 | if (!m_scriptListens_atRotTarget && !m_scriptListens_notAtRotTarget) | ||
1281 | { | ||
1282 | lock (m_rotTargets) | ||
1283 | m_rotTargets.Clear(); | ||
1284 | m_scene.RemoveGroupTarget(this); | ||
1285 | } | ||
1265 | 1286 | ||
1266 | ScheduleGroupForFullUpdate(); | 1287 | ScheduleGroupForFullUpdate(); |
1267 | } | 1288 | } |
@@ -3158,6 +3179,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
3158 | 3179 | ||
3159 | } | 3180 | } |
3160 | } | 3181 | } |
3182 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) | ||
3183 | { | ||
3184 | scriptRotTarget waypoint = new scriptRotTarget(); | ||
3185 | waypoint.targetRot = target; | ||
3186 | waypoint.tolerance = tolerance; | ||
3187 | uint handle = m_scene.AllocateLocalId(); | ||
3188 | waypoint.handle = handle; | ||
3189 | lock (m_rotTargets) | ||
3190 | { | ||
3191 | m_rotTargets.Add(handle, waypoint); | ||
3192 | } | ||
3193 | m_scene.AddGroupTarget(this); | ||
3194 | return (int)handle; | ||
3195 | } | ||
3196 | |||
3197 | public void unregisterRotTargetWaypoint(int handle) | ||
3198 | { | ||
3199 | lock (m_targets) | ||
3200 | { | ||
3201 | m_rotTargets.Remove((uint)handle); | ||
3202 | if (m_targets.Count == 0) | ||
3203 | m_scene.RemoveGroupTarget(this); | ||
3204 | } | ||
3205 | } | ||
3161 | 3206 | ||
3162 | public int registerTargetWaypoint(Vector3 target, float tolerance) | 3207 | public int registerTargetWaypoint(Vector3 target, float tolerance) |
3163 | { | 3208 | { |
@@ -3264,6 +3309,85 @@ namespace OpenSim.Region.Framework.Scenes | |||
3264 | } | 3309 | } |
3265 | } | 3310 | } |
3266 | } | 3311 | } |
3312 | if (m_scriptListens_atRotTarget || m_scriptListens_notAtRotTarget) | ||
3313 | { | ||
3314 | if (m_rotTargets.Count > 0) | ||
3315 | { | ||
3316 | bool at_Rottarget = false; | ||
3317 | Dictionary<uint, scriptRotTarget> atRotTargets = new Dictionary<uint, scriptRotTarget>(); | ||
3318 | lock (m_rotTargets) | ||
3319 | { | ||
3320 | foreach (uint idx in m_rotTargets.Keys) | ||
3321 | { | ||
3322 | scriptRotTarget target = m_rotTargets[idx]; | ||
3323 | double angle = Math.Acos(target.targetRot.X * m_rootPart.RotationOffset.X + target.targetRot.Y * m_rootPart.RotationOffset.Y + target.targetRot.Z * m_rootPart.RotationOffset.Z + target.targetRot.W * m_rootPart.RotationOffset.W) * 2; | ||
3324 | if (angle < 0) angle = -angle; | ||
3325 | if (angle > Math.PI) angle = (Math.PI * 2 - angle); | ||
3326 | if (angle <= target.tolerance) | ||
3327 | { | ||
3328 | // trigger at_rot_target | ||
3329 | if (m_scriptListens_atRotTarget) | ||
3330 | { | ||
3331 | at_Rottarget = true; | ||
3332 | scriptRotTarget att = new scriptRotTarget(); | ||
3333 | att.targetRot = target.targetRot; | ||
3334 | att.tolerance = target.tolerance; | ||
3335 | att.handle = target.handle; | ||
3336 | atRotTargets.Add(idx, att); | ||
3337 | } | ||
3338 | } | ||
3339 | } | ||
3340 | } | ||
3341 | |||
3342 | if (atRotTargets.Count > 0) | ||
3343 | { | ||
3344 | uint[] localids = new uint[0]; | ||
3345 | lock (m_parts) | ||
3346 | { | ||
3347 | localids = new uint[m_parts.Count]; | ||
3348 | int cntr = 0; | ||
3349 | foreach (SceneObjectPart part in m_parts.Values) | ||
3350 | { | ||
3351 | localids[cntr] = part.LocalId; | ||
3352 | cntr++; | ||
3353 | } | ||
3354 | } | ||
3355 | |||
3356 | for (int ctr = 0; ctr < localids.Length; ctr++) | ||
3357 | { | ||
3358 | foreach (uint target in atRotTargets.Keys) | ||
3359 | { | ||
3360 | scriptRotTarget att = atRotTargets[target]; | ||
3361 | m_scene.EventManager.TriggerAtRotTargetEvent( | ||
3362 | localids[ctr], att.handle, att.targetRot, m_rootPart.RotationOffset); | ||
3363 | } | ||
3364 | } | ||
3365 | |||
3366 | return; | ||
3367 | } | ||
3368 | |||
3369 | if (m_scriptListens_notAtRotTarget && !at_Rottarget) | ||
3370 | { | ||
3371 | //trigger not_at_target | ||
3372 | uint[] localids = new uint[0]; | ||
3373 | lock (m_parts) | ||
3374 | { | ||
3375 | localids = new uint[m_parts.Count]; | ||
3376 | int cntr = 0; | ||
3377 | foreach (SceneObjectPart part in m_parts.Values) | ||
3378 | { | ||
3379 | localids[cntr] = part.LocalId; | ||
3380 | cntr++; | ||
3381 | } | ||
3382 | } | ||
3383 | |||
3384 | for (int ctr = 0; ctr < localids.Length; ctr++) | ||
3385 | { | ||
3386 | m_scene.EventManager.TriggerNotAtRotTargetEvent(localids[ctr]); | ||
3387 | } | ||
3388 | } | ||
3389 | } | ||
3390 | } | ||
3267 | } | 3391 | } |
3268 | 3392 | ||
3269 | public float GetMass() | 3393 | public float GetMass() |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index d1bc351..56b2f13 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -139,15 +139,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
139 | public uint TimeStampTerse; | 139 | public uint TimeStampTerse; |
140 | 140 | ||
141 | [XmlIgnore] | 141 | [XmlIgnore] |
142 | public UUID FromItemID; | 142 | public UUID FromItemID; |
143 | 143 | ||
144 | [XmlIgnore] | 144 | [XmlIgnore] |
145 | public int STATUS_ROTATE_X; | 145 | public int STATUS_ROTATE_X; |
146 | 146 | ||
147 | [XmlIgnore] | 147 | [XmlIgnore] |
148 | public int STATUS_ROTATE_Y; | 148 | public int STATUS_ROTATE_Y; |
149 | 149 | ||
150 | [XmlIgnore] | 150 | [XmlIgnore] |
151 | public int STATUS_ROTATE_Z; | 151 | public int STATUS_ROTATE_Z; |
152 | 152 | ||
153 | [XmlIgnore] | 153 | [XmlIgnore] |
@@ -1680,19 +1680,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1680 | return false; | 1680 | return false; |
1681 | 1681 | ||
1682 | return m_parentGroup.RootPart.DIE_AT_EDGE; | 1682 | return m_parentGroup.RootPart.DIE_AT_EDGE; |
1683 | } | 1683 | } |
1684 | 1684 | ||
1685 | public int GetAxisRotation(int axis) | 1685 | public int GetAxisRotation(int axis) |
1686 | { | 1686 | { |
1687 | //Cannot use ScriptBaseClass constants as no referance to it currently. | 1687 | //Cannot use ScriptBaseClass constants as no referance to it currently. |
1688 | if (axis == 2)//STATUS_ROTATE_X | 1688 | if (axis == 2)//STATUS_ROTATE_X |
1689 | return STATUS_ROTATE_X; | 1689 | return STATUS_ROTATE_X; |
1690 | if (axis == 4)//STATUS_ROTATE_Y | 1690 | if (axis == 4)//STATUS_ROTATE_Y |
1691 | return STATUS_ROTATE_Y; | 1691 | return STATUS_ROTATE_Y; |
1692 | if (axis == 8)//STATUS_ROTATE_Z | 1692 | if (axis == 8)//STATUS_ROTATE_Z |
1693 | return STATUS_ROTATE_Z; | 1693 | return STATUS_ROTATE_Z; |
1694 | 1694 | ||
1695 | return 0; | 1695 | return 0; |
1696 | } | 1696 | } |
1697 | 1697 | ||
1698 | public double GetDistanceTo(Vector3 a, Vector3 b) | 1698 | public double GetDistanceTo(Vector3 a, Vector3 b) |
@@ -1853,16 +1853,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1853 | // and build up list of colliders this time | 1853 | // and build up list of colliders this time |
1854 | foreach (uint localid in collissionswith.Keys) | 1854 | foreach (uint localid in collissionswith.Keys) |
1855 | { | 1855 | { |
1856 | if (localid != 0) | 1856 | thisHitColliders.Add(localid); |
1857 | if (!m_lastColliders.Contains(localid)) | ||
1857 | { | 1858 | { |
1858 | thisHitColliders.Add(localid); | 1859 | startedColliders.Add(localid); |
1859 | if (!m_lastColliders.Contains(localid)) | ||
1860 | { | ||
1861 | startedColliders.Add(localid); | ||
1862 | } | ||
1863 | |||
1864 | //m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString()); | ||
1865 | } | 1860 | } |
1861 | //m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString()); | ||
1866 | } | 1862 | } |
1867 | 1863 | ||
1868 | // calculate things that ended colliding | 1864 | // calculate things that ended colliding |
@@ -1904,6 +1900,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1904 | List<DetectedObject> colliding = new List<DetectedObject>(); | 1900 | List<DetectedObject> colliding = new List<DetectedObject>(); |
1905 | foreach (uint localId in startedColliders) | 1901 | foreach (uint localId in startedColliders) |
1906 | { | 1902 | { |
1903 | if (localId == 0) | ||
1904 | return; | ||
1907 | // always running this check because if the user deletes the object it would return a null reference. | 1905 | // always running this check because if the user deletes the object it would return a null reference. |
1908 | if (m_parentGroup == null) | 1906 | if (m_parentGroup == null) |
1909 | return; | 1907 | return; |
@@ -1936,24 +1934,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1936 | else | 1934 | else |
1937 | { | 1935 | { |
1938 | } | 1936 | } |
1939 | } | 1937 | } |
1940 | else | 1938 | else |
1941 | { | 1939 | { |
1942 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 1940 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
1943 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work | 1941 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work |
1944 | if (found) | 1942 | if (!found) |
1945 | { | 1943 | { |
1946 | DetectedObject detobj = new DetectedObject(); | 1944 | DetectedObject detobj = new DetectedObject(); |
1947 | detobj.keyUUID = obj.UUID; | 1945 | detobj.keyUUID = obj.UUID; |
1948 | detobj.nameStr = obj.Name; | 1946 | detobj.nameStr = obj.Name; |
1949 | detobj.ownerUUID = obj._ownerID; | 1947 | detobj.ownerUUID = obj._ownerID; |
1950 | detobj.posVector = obj.AbsolutePosition; | 1948 | detobj.posVector = obj.AbsolutePosition; |
1951 | detobj.rotQuat = obj.GetWorldRotation(); | 1949 | detobj.rotQuat = obj.GetWorldRotation(); |
1952 | detobj.velVector = obj.Velocity; | 1950 | detobj.velVector = obj.Velocity; |
1953 | detobj.colliderType = 0; | 1951 | detobj.colliderType = 0; |
1954 | detobj.groupUUID = obj._groupID; | 1952 | detobj.groupUUID = obj._groupID; |
1955 | colliding.Add(detobj); | 1953 | colliding.Add(detobj); |
1956 | } | 1954 | } |
1957 | } | 1955 | } |
1958 | } | 1956 | } |
1959 | else | 1957 | else |
@@ -1965,7 +1963,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1965 | ScenePresence av = avlist[i]; | 1963 | ScenePresence av = avlist[i]; |
1966 | 1964 | ||
1967 | if (av.LocalId == localId) | 1965 | if (av.LocalId == localId) |
1968 | { | 1966 | { |
1969 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) | 1967 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) |
1970 | { | 1968 | { |
1971 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 1969 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
@@ -1987,24 +1985,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1987 | else | 1985 | else |
1988 | { | 1986 | { |
1989 | } | 1987 | } |
1990 | } | 1988 | } |
1991 | else | 1989 | else |
1992 | { | 1990 | { |
1993 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 1991 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
1994 | //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work | 1992 | //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work |
1995 | if (!found) | 1993 | if (!found) |
1996 | { | 1994 | { |
1997 | DetectedObject detobj = new DetectedObject(); | 1995 | DetectedObject detobj = new DetectedObject(); |
1998 | detobj.keyUUID = av.UUID; | 1996 | detobj.keyUUID = av.UUID; |
1999 | detobj.nameStr = av.ControllingClient.Name; | 1997 | detobj.nameStr = av.ControllingClient.Name; |
2000 | detobj.ownerUUID = av.UUID; | 1998 | detobj.ownerUUID = av.UUID; |
2001 | detobj.posVector = av.AbsolutePosition; | 1999 | detobj.posVector = av.AbsolutePosition; |
2002 | detobj.rotQuat = av.Rotation; | 2000 | detobj.rotQuat = av.Rotation; |
2003 | detobj.velVector = av.Velocity; | 2001 | detobj.velVector = av.Velocity; |
2004 | detobj.colliderType = 0; | 2002 | detobj.colliderType = 0; |
2005 | detobj.groupUUID = av.ControllingClient.ActiveGroupId; | 2003 | detobj.groupUUID = av.ControllingClient.ActiveGroupId; |
2006 | colliding.Add(detobj); | 2004 | colliding.Add(detobj); |
2007 | } | 2005 | } |
2008 | } | 2006 | } |
2009 | 2007 | ||
2010 | } | 2008 | } |
@@ -2039,7 +2037,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2039 | { | 2037 | { |
2040 | // always running this check because if the user deletes the object it would return a null reference. | 2038 | // always running this check because if the user deletes the object it would return a null reference. |
2041 | if (localId == 0) | 2039 | if (localId == 0) |
2042 | continue; | 2040 | return; |
2043 | 2041 | ||
2044 | if (m_parentGroup == null) | 2042 | if (m_parentGroup == null) |
2045 | return; | 2043 | return; |
@@ -2077,7 +2075,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2077 | { | 2075 | { |
2078 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 2076 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
2079 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work | 2077 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work |
2080 | if (found) | 2078 | if (!found) |
2081 | { | 2079 | { |
2082 | DetectedObject detobj = new DetectedObject(); | 2080 | DetectedObject detobj = new DetectedObject(); |
2083 | detobj.keyUUID = obj.UUID; | 2081 | detobj.keyUUID = obj.UUID; |
@@ -2101,7 +2099,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2101 | ScenePresence av = avlist[i]; | 2099 | ScenePresence av = avlist[i]; |
2102 | 2100 | ||
2103 | if (av.LocalId == localId) | 2101 | if (av.LocalId == localId) |
2104 | { | 2102 | { |
2105 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) | 2103 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) |
2106 | { | 2104 | { |
2107 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 2105 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
@@ -2171,7 +2169,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2171 | foreach (uint localId in endedColliders) | 2169 | foreach (uint localId in endedColliders) |
2172 | { | 2170 | { |
2173 | if (localId == 0) | 2171 | if (localId == 0) |
2174 | continue; | 2172 | return; |
2175 | 2173 | ||
2176 | // always running this check because if the user deletes the object it would return a null reference. | 2174 | // always running this check because if the user deletes the object it would return a null reference. |
2177 | if (m_parentGroup == null) | 2175 | if (m_parentGroup == null) |
@@ -2208,7 +2206,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2208 | { | 2206 | { |
2209 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 2207 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
2210 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work | 2208 | //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work |
2211 | if (found) | 2209 | if (!found) |
2212 | { | 2210 | { |
2213 | DetectedObject detobj = new DetectedObject(); | 2211 | DetectedObject detobj = new DetectedObject(); |
2214 | detobj.keyUUID = obj.UUID; | 2212 | detobj.keyUUID = obj.UUID; |
@@ -2232,7 +2230,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2232 | ScenePresence av = avlist[i]; | 2230 | ScenePresence av = avlist[i]; |
2233 | 2231 | ||
2234 | if (av.LocalId == localId) | 2232 | if (av.LocalId == localId) |
2235 | { | 2233 | { |
2236 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) | 2234 | if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) |
2237 | { | 2235 | { |
2238 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); | 2236 | bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); |
@@ -2292,7 +2290,121 @@ namespace OpenSim.Region.Framework.Scenes | |||
2292 | m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); | 2290 | m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); |
2293 | } | 2291 | } |
2294 | } | 2292 | } |
2295 | } | 2293 | } |
2294 | if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0) | ||
2295 | { | ||
2296 | if (startedColliders.Count > 0) | ||
2297 | { | ||
2298 | ColliderArgs LandStartCollidingMessage = new ColliderArgs(); | ||
2299 | List<DetectedObject> colliding = new List<DetectedObject>(); | ||
2300 | foreach (uint localId in startedColliders) | ||
2301 | { | ||
2302 | if (localId == 0) | ||
2303 | { | ||
2304 | //Hope that all is left is ground! | ||
2305 | DetectedObject detobj = new DetectedObject(); | ||
2306 | detobj.keyUUID = UUID.Zero; | ||
2307 | detobj.nameStr = ""; | ||
2308 | detobj.ownerUUID = UUID.Zero; | ||
2309 | detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; | ||
2310 | detobj.rotQuat = Quaternion.Identity; | ||
2311 | detobj.velVector = Vector3.Zero; | ||
2312 | detobj.colliderType = 0; | ||
2313 | detobj.groupUUID = UUID.Zero; | ||
2314 | colliding.Add(detobj); | ||
2315 | } | ||
2316 | } | ||
2317 | |||
2318 | if (colliding.Count > 0) | ||
2319 | { | ||
2320 | LandStartCollidingMessage.Colliders = colliding; | ||
2321 | // always running this check because if the user deletes the object it would return a null reference. | ||
2322 | if (m_parentGroup == null) | ||
2323 | return; | ||
2324 | |||
2325 | if (m_parentGroup.Scene == null) | ||
2326 | return; | ||
2327 | |||
2328 | m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage); | ||
2329 | } | ||
2330 | } | ||
2331 | } | ||
2332 | if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0) | ||
2333 | { | ||
2334 | if (m_lastColliders.Count > 0) | ||
2335 | { | ||
2336 | ColliderArgs LandCollidingMessage = new ColliderArgs(); | ||
2337 | List<DetectedObject> colliding = new List<DetectedObject>(); | ||
2338 | foreach (uint localId in startedColliders) | ||
2339 | { | ||
2340 | if (localId == 0) | ||
2341 | { | ||
2342 | //Hope that all is left is ground! | ||
2343 | DetectedObject detobj = new DetectedObject(); | ||
2344 | detobj.keyUUID = UUID.Zero; | ||
2345 | detobj.nameStr = ""; | ||
2346 | detobj.ownerUUID = UUID.Zero; | ||
2347 | detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; | ||
2348 | detobj.rotQuat = Quaternion.Identity; | ||
2349 | detobj.velVector = Vector3.Zero; | ||
2350 | detobj.colliderType = 0; | ||
2351 | detobj.groupUUID = UUID.Zero; | ||
2352 | colliding.Add(detobj); | ||
2353 | } | ||
2354 | } | ||
2355 | |||
2356 | if (colliding.Count > 0) | ||
2357 | { | ||
2358 | LandCollidingMessage.Colliders = colliding; | ||
2359 | // always running this check because if the user deletes the object it would return a null reference. | ||
2360 | if (m_parentGroup == null) | ||
2361 | return; | ||
2362 | |||
2363 | if (m_parentGroup.Scene == null) | ||
2364 | return; | ||
2365 | |||
2366 | m_parentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage); | ||
2367 | } | ||
2368 | } | ||
2369 | } | ||
2370 | if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0) | ||
2371 | { | ||
2372 | if (endedColliders.Count > 0) | ||
2373 | { | ||
2374 | ColliderArgs LandEndCollidingMessage = new ColliderArgs(); | ||
2375 | List<DetectedObject> colliding = new List<DetectedObject>(); | ||
2376 | foreach (uint localId in startedColliders) | ||
2377 | { | ||
2378 | if (localId == 0) | ||
2379 | { | ||
2380 | //Hope that all is left is ground! | ||
2381 | DetectedObject detobj = new DetectedObject(); | ||
2382 | detobj.keyUUID = UUID.Zero; | ||
2383 | detobj.nameStr = ""; | ||
2384 | detobj.ownerUUID = UUID.Zero; | ||
2385 | detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; | ||
2386 | detobj.rotQuat = Quaternion.Identity; | ||
2387 | detobj.velVector = Vector3.Zero; | ||
2388 | detobj.colliderType = 0; | ||
2389 | detobj.groupUUID = UUID.Zero; | ||
2390 | colliding.Add(detobj); | ||
2391 | } | ||
2392 | } | ||
2393 | |||
2394 | if (colliding.Count > 0) | ||
2395 | { | ||
2396 | LandEndCollidingMessage.Colliders = colliding; | ||
2397 | // always running this check because if the user deletes the object it would return a null reference. | ||
2398 | if (m_parentGroup == null) | ||
2399 | return; | ||
2400 | |||
2401 | if (m_parentGroup.Scene == null) | ||
2402 | return; | ||
2403 | |||
2404 | m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage); | ||
2405 | } | ||
2406 | } | ||
2407 | } | ||
2296 | } | 2408 | } |
2297 | 2409 | ||
2298 | public void PhysicsOutOfBounds(Vector3 pos) | 2410 | public void PhysicsOutOfBounds(Vector3 pos) |
@@ -2758,13 +2870,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2758 | if (m_parentGroup != null) | 2870 | if (m_parentGroup != null) |
2759 | { | 2871 | { |
2760 | m_parentGroup.SetAxisRotation(axis, rotate); | 2872 | m_parentGroup.SetAxisRotation(axis, rotate); |
2761 | } | 2873 | } |
2762 | //Cannot use ScriptBaseClass constants as no referance to it currently. | 2874 | //Cannot use ScriptBaseClass constants as no referance to it currently. |
2763 | if (axis == 2)//STATUS_ROTATE_X | 2875 | if (axis == 2)//STATUS_ROTATE_X |
2764 | STATUS_ROTATE_X = rotate; | 2876 | STATUS_ROTATE_X = rotate; |
2765 | if (axis == 4)//STATUS_ROTATE_Y | 2877 | if (axis == 4)//STATUS_ROTATE_Y |
2766 | STATUS_ROTATE_Y = rotate; | 2878 | STATUS_ROTATE_Y = rotate; |
2767 | if (axis == 8)//STATUS_ROTATE_Z | 2879 | if (axis == 8)//STATUS_ROTATE_Z |
2768 | STATUS_ROTATE_Z = rotate; | 2880 | STATUS_ROTATE_Z = rotate; |
2769 | } | 2881 | } |
2770 | 2882 | ||
@@ -3698,6 +3810,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3698 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || | 3810 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || |
3699 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | 3811 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || |
3700 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | 3812 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || |
3813 | ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
3814 | ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
3815 | ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
3701 | (CollisionSound != UUID.Zero) | 3816 | (CollisionSound != UUID.Zero) |
3702 | ) | 3817 | ) |
3703 | { | 3818 | { |
@@ -3902,6 +4017,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3902 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || | 4017 | ((AggregateScriptEvents & scriptEvents.collision) != 0) || |
3903 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || | 4018 | ((AggregateScriptEvents & scriptEvents.collision_end) != 0) || |
3904 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || | 4019 | ((AggregateScriptEvents & scriptEvents.collision_start) != 0) || |
4020 | ((AggregateScriptEvents & scriptEvents.land_collision_start) != 0) || | ||
4021 | ((AggregateScriptEvents & scriptEvents.land_collision) != 0) || | ||
4022 | ((AggregateScriptEvents & scriptEvents.land_collision_end) != 0) || | ||
3905 | (CollisionSound != UUID.Zero) | 4023 | (CollisionSound != UUID.Zero) |
3906 | ) | 4024 | ) |
3907 | { | 4025 | { |
@@ -3962,6 +4080,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
3962 | } | 4080 | } |
3963 | } | 4081 | } |
3964 | 4082 | ||
4083 | public int registerRotTargetWaypoint(Quaternion target, float tolerance) | ||
4084 | { | ||
4085 | if (m_parentGroup != null) | ||
4086 | { | ||
4087 | return m_parentGroup.registerRotTargetWaypoint(target, tolerance); | ||
4088 | } | ||
4089 | return 0; | ||
4090 | } | ||
4091 | |||
4092 | public void unregisterRotTargetWaypoint(int handle) | ||
4093 | { | ||
4094 | if (m_parentGroup != null) | ||
4095 | { | ||
4096 | m_parentGroup.unregisterRotTargetWaypoint(handle); | ||
4097 | } | ||
4098 | } | ||
4099 | |||
3965 | public void SetCameraAtOffset(Vector3 v) | 4100 | public void SetCameraAtOffset(Vector3 v) |
3966 | { | 4101 | { |
3967 | m_cameraAtOffset = v; | 4102 | m_cameraAtOffset = v; |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 10b352f..6785c08 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1220 | 1220 | ||
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 1223 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
1224 | { | 1224 | { |
1225 | 1225 | ||
1226 | } | 1226 | } |
@@ -1657,7 +1657,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1657 | } | 1657 | } |
1658 | 1658 | ||
1659 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1659 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1660 | { | 1660 | { |
1661 | } | ||
1662 | |||
1663 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1664 | { | ||
1665 | } | ||
1666 | |||
1667 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1668 | { | ||
1661 | } | 1669 | } |
1662 | } | 1670 | } |
1663 | } | 1671 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index 3c5e8c9..b3fa07f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs | |||
@@ -220,8 +220,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat | |||
220 | 220 | ||
221 | // Fail if fundamental information is still missing | 221 | // Fail if fundamental information is still missing |
222 | 222 | ||
223 | if (cs.Server == null || cs.IrcChannel == null || cs.BaseNickname == null || cs.User == null) | 223 | if (cs.Server == null) |
224 | throw new Exception(String.Format("[IRC-Channel-{0}] Invalid configuration for region {1}", cs.idn, rs.Region)); | 224 | throw new Exception(String.Format("[IRC-Channel-{0}] Invalid configuration for region {1}: server missing", cs.idn, rs.Region)); |
225 | else if (cs.IrcChannel == null) | ||
226 | throw new Exception(String.Format("[IRC-Channel-{0}] Invalid configuration for region {1}: channel missing", cs.idn, rs.Region)); | ||
227 | else if (cs.BaseNickname == null) | ||
228 | throw new Exception(String.Format("[IRC-Channel-{0}] Invalid configuration for region {1}: nick missing", cs.idn, rs.Region)); | ||
229 | else if (cs.User == null) | ||
230 | throw new Exception(String.Format("[IRC-Channel-{0}] Invalid configuration for region {1}: user missing", cs.idn, rs.Region)); | ||
225 | 231 | ||
226 | m_log.InfoFormat("[IRC-Channel-{0}] Configuration for Region {1} is valid", cs.idn, rs.Region); | 232 | m_log.InfoFormat("[IRC-Channel-{0}] Configuration for Region {1} is valid", cs.idn, rs.Region); |
227 | m_log.InfoFormat("[IRC-Channel-{0}] Server = {1}", cs.idn, cs.Server); | 233 | m_log.InfoFormat("[IRC-Channel-{0}] Server = {1}", cs.idn, cs.Server); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index daefd70..4a4c515 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -897,7 +897,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
897 | { | 897 | { |
898 | } | 898 | } |
899 | 899 | ||
900 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 900 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
901 | { | 901 | { |
902 | } | 902 | } |
903 | 903 | ||
@@ -1138,7 +1138,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1138 | } | 1138 | } |
1139 | 1139 | ||
1140 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1140 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1141 | { | 1141 | { |
1142 | } | ||
1143 | |||
1144 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1145 | { | ||
1146 | } | ||
1147 | |||
1148 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1149 | { | ||
1142 | } | 1150 | } |
1143 | } | 1151 | } |
1144 | } | 1152 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b9defbe..c9998c0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2109,14 +2109,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2109 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) | 2109 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) |
2110 | { | 2110 | { |
2111 | m_host.AddScriptLPS(1); | 2111 | m_host.AddScriptLPS(1); |
2112 | NotImplemented("llRotTarget"); | 2112 | return m_host.registerRotTargetWaypoint(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error); |
2113 | return 0; | ||
2114 | } | 2113 | } |
2115 | 2114 | ||
2116 | public void llRotTargetRemove(int number) | 2115 | public void llRotTargetRemove(int number) |
2117 | { | 2116 | { |
2118 | m_host.AddScriptLPS(1); | 2117 | m_host.AddScriptLPS(1); |
2119 | NotImplemented("llRotTargetRemove"); | 2118 | m_host.unregisterRotTargetWaypoint(number); |
2120 | } | 2119 | } |
2121 | 2120 | ||
2122 | public void llMoveToTarget(LSL_Vector target, double tau) | 2121 | public void llMoveToTarget(LSL_Vector target, double tau) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d8b9159..2c8b0ea 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1983,6 +1983,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1983 | 1983 | ||
1984 | return (int)pws; | 1984 | return (int)pws; |
1985 | } | 1985 | } |
1986 | |||
1986 | public void osSetSpeed(string UUID, float SpeedModifier) | 1987 | public void osSetSpeed(string UUID, float SpeedModifier) |
1987 | { | 1988 | { |
1988 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); | 1989 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); |
@@ -1990,6 +1991,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1990 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); | 1991 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); |
1991 | avatar.SpeedModifier = SpeedModifier; | 1992 | avatar.SpeedModifier = SpeedModifier; |
1992 | } | 1993 | } |
1994 | |||
1993 | public void osKickAvatar(string FirstName,string SurName,string alert) | 1995 | public void osKickAvatar(string FirstName,string SurName,string alert) |
1994 | { | 1996 | { |
1995 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); | 1997 | CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); |
@@ -2010,6 +2012,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2010 | } | 2012 | } |
2011 | } | 2013 | } |
2012 | } | 2014 | } |
2015 | |||
2013 | public void osCauseDamage(string avatar, double damage) | 2016 | public void osCauseDamage(string avatar, double damage) |
2014 | { | 2017 | { |
2015 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); | 2018 | CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); |
@@ -2037,6 +2040,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2037 | } | 2040 | } |
2038 | } | 2041 | } |
2039 | } | 2042 | } |
2043 | |||
2040 | public void osCauseHealing(string avatar, double healing) | 2044 | public void osCauseHealing(string avatar, double healing) |
2041 | { | 2045 | { |
2042 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); | 2046 | CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); |
@@ -2061,4 +2065,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2061 | } | 2065 | } |
2062 | } | 2066 | } |
2063 | } | 2067 | } |
2064 | } | 2068 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs index 7f67599..9615315 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs | |||
@@ -62,6 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
62 | land_collision_end = 4096, | 62 | land_collision_end = 4096, |
63 | land_collision_start = 8192, | 63 | land_collision_start = 8192, |
64 | at_target = 16384, | 64 | at_target = 16384, |
65 | at_rot_target = 16777216, | ||
65 | listen = 32768, | 66 | listen = 32768, |
66 | money = 65536, | 67 | money = 65536, |
67 | moving_end = 131072, | 68 | moving_end = 131072, |
@@ -203,7 +204,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
203 | } | 204 | } |
204 | 205 | ||
205 | m_eventFlagsMap.Add("attach", scriptEvents.attach); | 206 | m_eventFlagsMap.Add("attach", scriptEvents.attach); |
206 | // m_eventFlagsMap.Add("at_rot_target",(long)scriptEvents.at_rot_target); | 207 | m_eventFlagsMap.Add("at_rot_target", scriptEvents.at_rot_target); |
207 | m_eventFlagsMap.Add("at_target", scriptEvents.at_target); | 208 | m_eventFlagsMap.Add("at_target", scriptEvents.at_target); |
208 | // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed); | 209 | // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed); |
209 | m_eventFlagsMap.Add("collision", scriptEvents.collision); | 210 | m_eventFlagsMap.Add("collision", scriptEvents.collision); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 8195f33..16309ef 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -59,10 +59,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
59 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; | 59 | myScriptEngine.World.EventManager.OnScriptChangedEvent += changed; |
60 | myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target; | 60 | myScriptEngine.World.EventManager.OnScriptAtTargetEvent += at_target; |
61 | myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; | 61 | myScriptEngine.World.EventManager.OnScriptNotAtTargetEvent += not_at_target; |
62 | myScriptEngine.World.EventManager.OnScriptAtRotTargetEvent += at_rot_target; | ||
63 | myScriptEngine.World.EventManager.OnScriptNotAtRotTargetEvent += not_at_rot_target; | ||
62 | myScriptEngine.World.EventManager.OnScriptControlEvent += control; | 64 | myScriptEngine.World.EventManager.OnScriptControlEvent += control; |
63 | myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; | 65 | myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; |
64 | myScriptEngine.World.EventManager.OnScriptColliding += collision; | 66 | myScriptEngine.World.EventManager.OnScriptColliding += collision; |
65 | myScriptEngine.World.EventManager.OnScriptCollidingEnd += collision_end; | 67 | myScriptEngine.World.EventManager.OnScriptCollidingEnd += collision_end; |
68 | myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start; | ||
69 | myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision; | ||
70 | myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end; | ||
66 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); | 71 | IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); |
67 | if (money != null) | 72 | if (money != null) |
68 | { | 73 | { |
@@ -285,29 +290,63 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
285 | det.ToArray())); | 290 | det.ToArray())); |
286 | } | 291 | } |
287 | 292 | ||
288 | public void land_collision_start(uint localID, UUID itemID) | 293 | public void land_collision_start(uint localID, ColliderArgs col) |
289 | { | 294 | { |
290 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 295 | List<DetectParams> det = new List<DetectParams>(); |
291 | "land_collision_start", | 296 | |
292 | new object[0], | 297 | foreach (DetectedObject detobj in col.Colliders) |
293 | new DetectParams[0])); | 298 | { |
299 | DetectParams d = new DetectParams(); | ||
300 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | ||
301 | detobj.posVector.Y, | ||
302 | detobj.posVector.Z); | ||
303 | d.Populate(myScriptEngine.World); | ||
304 | det.Add(d); | ||
305 | myScriptEngine.PostObjectEvent(localID, new EventParams( | ||
306 | "land_collision_start", | ||
307 | new Object[] { new LSL_Types.Vector3(d.Position) }, | ||
308 | det.ToArray())); | ||
309 | } | ||
310 | |||
294 | } | 311 | } |
295 | 312 | ||
296 | public void land_collision(uint localID, UUID itemID) | 313 | public void land_collision(uint localID, ColliderArgs col) |
297 | { | 314 | { |
298 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 315 | List<DetectParams> det = new List<DetectParams>(); |
299 | "land_collision", | 316 | |
300 | new object[0], | 317 | foreach (DetectedObject detobj in col.Colliders) |
301 | new DetectParams[0])); | 318 | { |
319 | DetectParams d = new DetectParams(); | ||
320 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | ||
321 | detobj.posVector.Y, | ||
322 | detobj.posVector.Z); | ||
323 | d.Populate(myScriptEngine.World); | ||
324 | det.Add(d); | ||
325 | myScriptEngine.PostObjectEvent(localID, new EventParams( | ||
326 | "land_collision", | ||
327 | new Object[] { new LSL_Types.Vector3(d.Position) }, | ||
328 | det.ToArray())); | ||
329 | } | ||
302 | } | 330 | } |
303 | 331 | ||
304 | public void land_collision_end(uint localID, UUID itemID) | 332 | public void land_collision_end(uint localID, ColliderArgs col) |
305 | { | 333 | { |
306 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 334 | List<DetectParams> det = new List<DetectParams>(); |
307 | "land_collision_end", | 335 | |
308 | new object[0], | 336 | foreach (DetectedObject detobj in col.Colliders) |
309 | new DetectParams[0])); | 337 | { |
310 | } | 338 | DetectParams d = new DetectParams(); |
339 | d.Position = new LSL_Types.Vector3(detobj.posVector.X, | ||
340 | detobj.posVector.Y, | ||
341 | detobj.posVector.Z); | ||
342 | d.Populate(myScriptEngine.World); | ||
343 | det.Add(d); | ||
344 | myScriptEngine.PostObjectEvent(localID, new EventParams( | ||
345 | "land_collision_end", | ||
346 | new Object[] { new LSL_Types.Vector3(d.Position) }, | ||
347 | det.ToArray())); | ||
348 | } | ||
349 | } | ||
311 | 350 | ||
312 | // timer: not handled here | 351 | // timer: not handled here |
313 | // listen: not handled here | 352 | // listen: not handled here |
@@ -353,14 +392,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
353 | new DetectParams[0])); | 392 | new DetectParams[0])); |
354 | } | 393 | } |
355 | 394 | ||
356 | public void at_rot_target(uint localID, UUID itemID) | 395 | public void at_rot_target(uint localID, uint handle, Quaternion targetrot, |
396 | Quaternion atrot) | ||
357 | { | 397 | { |
358 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 398 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
359 | "at_rot_target",new object[0], | 399 | "at_rot_target", new object[] { |
400 | new LSL_Types.LSLInteger(handle), | ||
401 | new LSL_Types.Quaternion(targetrot.X,targetrot.Y,targetrot.Z,targetrot.W), | ||
402 | new LSL_Types.Quaternion(atrot.X,atrot.Y,atrot.Z,atrot.W) }, | ||
360 | new DetectParams[0])); | 403 | new DetectParams[0])); |
361 | } | 404 | } |
362 | 405 | ||
363 | public void not_at_rot_target(uint localID, UUID itemID) | 406 | public void not_at_rot_target(uint localID) |
364 | { | 407 | { |
365 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 408 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
366 | "not_at_rot_target",new object[0], | 409 | "not_at_rot_target",new object[0], |
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs index ed0210f..77184a4 100644 --- a/OpenSim/Server/Base/HttpServerBase.cs +++ b/OpenSim/Server/Base/HttpServerBase.cs | |||
@@ -49,6 +49,7 @@ namespace OpenSim.Server.Base | |||
49 | protected uint m_Port = 0; | 49 | protected uint m_Port = 0; |
50 | protected Dictionary<uint, BaseHttpServer> m_Servers = | 50 | protected Dictionary<uint, BaseHttpServer> m_Servers = |
51 | new Dictionary<uint, BaseHttpServer>(); | 51 | new Dictionary<uint, BaseHttpServer>(); |
52 | protected uint m_consolePort = 0; | ||
52 | 53 | ||
53 | public IHttpServer HttpServer | 54 | public IHttpServer HttpServer |
54 | { | 55 | { |
@@ -98,6 +99,7 @@ namespace OpenSim.Server.Base | |||
98 | Thread.CurrentThread.Abort(); | 99 | Thread.CurrentThread.Abort(); |
99 | } | 100 | } |
100 | 101 | ||
102 | m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0); | ||
101 | m_Port = port; | 103 | m_Port = port; |
102 | 104 | ||
103 | m_HttpServer = new BaseHttpServer(port); | 105 | m_HttpServer = new BaseHttpServer(port); |
@@ -111,7 +113,10 @@ namespace OpenSim.Server.Base | |||
111 | 113 | ||
112 | if (MainConsole.Instance is RemoteConsole) | 114 | if (MainConsole.Instance is RemoteConsole) |
113 | { | 115 | { |
114 | ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer); | 116 | if (m_consolePort == 0) |
117 | ((RemoteConsole)MainConsole.Instance).SetServer(m_HttpServer); | ||
118 | else | ||
119 | ((RemoteConsole)MainConsole.Instance).SetServer(GetHttpServer(m_consolePort)); | ||
115 | } | 120 | } |
116 | } | 121 | } |
117 | } | 122 | } |
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index b48e30e..c7d5ff1 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -38,6 +38,7 @@ using OpenSim.Services.Interfaces; | |||
38 | using OpenSim.Framework.Servers.HttpServer; | 38 | using OpenSim.Framework.Servers.HttpServer; |
39 | using OpenSim.Server.Handlers.Base; | 39 | using OpenSim.Server.Handlers.Base; |
40 | using log4net; | 40 | using log4net; |
41 | using OpenMetaverse; | ||
41 | 42 | ||
42 | namespace OpenSim.Server.Handlers.Asset | 43 | namespace OpenSim.Server.Handlers.Asset |
43 | { | 44 | { |
@@ -193,6 +194,14 @@ namespace OpenSim.Server.Handlers.Asset | |||
193 | { | 194 | { |
194 | Dictionary<string,object> result = new Dictionary<string,object>(); | 195 | Dictionary<string,object> result = new Dictionary<string,object>(); |
195 | 196 | ||
197 | if (!request.ContainsKey("PRINCIPAL")) | ||
198 | return FailureResult(); | ||
199 | |||
200 | if(m_InventoryService.CreateUserInventory(new UUID(request["PRINCIPAL"].ToString()))) | ||
201 | result["RESULT"] = "True"; | ||
202 | else | ||
203 | result["RESULT"] = "False"; | ||
204 | |||
196 | string xmlString = ServerUtils.BuildXmlResponse(result); | 205 | string xmlString = ServerUtils.BuildXmlResponse(result); |
197 | m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 206 | m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
198 | UTF8Encoding encoding = new UTF8Encoding(); | 207 | UTF8Encoding encoding = new UTF8Encoding(); |
@@ -203,6 +212,15 @@ namespace OpenSim.Server.Handlers.Asset | |||
203 | { | 212 | { |
204 | Dictionary<string,object> result = new Dictionary<string,object>(); | 213 | Dictionary<string,object> result = new Dictionary<string,object>(); |
205 | 214 | ||
215 | if (!request.ContainsKey("PRINCIPAL")) | ||
216 | return FailureResult(); | ||
217 | |||
218 | |||
219 | List<InventoryFolderBase> folders = m_InventoryService.GetInventorySkeleton(new UUID(request["PRINCIPAL"].ToString())); | ||
220 | |||
221 | foreach (InventoryFolderBase f in folders) | ||
222 | result[f.ID.ToString()] = EncodeFolder(f); | ||
223 | |||
206 | string xmlString = ServerUtils.BuildXmlResponse(result); | 224 | string xmlString = ServerUtils.BuildXmlResponse(result); |
207 | m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); | 225 | m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); |
208 | UTF8Encoding encoding = new UTF8Encoding(); | 226 | UTF8Encoding encoding = new UTF8Encoding(); |
@@ -378,5 +396,61 @@ namespace OpenSim.Server.Handlers.Asset | |||
378 | UTF8Encoding encoding = new UTF8Encoding(); | 396 | UTF8Encoding encoding = new UTF8Encoding(); |
379 | return encoding.GetBytes(xmlString); | 397 | return encoding.GetBytes(xmlString); |
380 | } | 398 | } |
399 | |||
400 | private Dictionary<string, object> EncodeFolder(InventoryFolderBase f) | ||
401 | { | ||
402 | Dictionary<string, object> ret = new Dictionary<string, object>(); | ||
403 | |||
404 | ret["ParentID"] = f.ParentID.ToString(); | ||
405 | ret["Type"] = f.Type.ToString(); | ||
406 | ret["Version"] = f.Version.ToString(); | ||
407 | ret["Name"] = f.Name; | ||
408 | ret["Owner"] = f.Owner.ToString(); | ||
409 | ret["ID"] = f.ID.ToString(); | ||
410 | |||
411 | return ret; | ||
412 | } | ||
413 | |||
414 | private InventoryFolderBase BuildFolder(Dictionary<string,object> data) | ||
415 | { | ||
416 | InventoryFolderBase folder = new InventoryFolderBase(); | ||
417 | |||
418 | folder.ParentID = new UUID(data["ParentID"].ToString()); | ||
419 | folder.Type = short.Parse(data["Type"].ToString()); | ||
420 | folder.Version = ushort.Parse(data["Version"].ToString()); | ||
421 | folder.Name = data["Name"].ToString(); | ||
422 | folder.Owner = new UUID(data["Owner"].ToString()); | ||
423 | folder.ID = new UUID(data["ID"].ToString()); | ||
424 | |||
425 | return folder; | ||
426 | } | ||
427 | |||
428 | private InventoryItemBase BuildItem(Dictionary<string,object> data) | ||
429 | { | ||
430 | InventoryItemBase item = new InventoryItemBase(); | ||
431 | |||
432 | item.AssetID = new UUID(data["AssetID"].ToString()); | ||
433 | item.AssetType = int.Parse(data["AssetType"].ToString()); | ||
434 | item.Name = data["Name"].ToString(); | ||
435 | item.Owner = new UUID(data["Owner"].ToString()); | ||
436 | item.ID = new UUID(data["ID"].ToString()); | ||
437 | item.InvType = int.Parse(data["InvType"].ToString()); | ||
438 | item.Folder = new UUID(data["Folder"].ToString()); | ||
439 | item.CreatorId = data["CreatorId"].ToString(); | ||
440 | item.Description = data["Description"].ToString(); | ||
441 | item.NextPermissions = uint.Parse(data["NextPermissions"].ToString()); | ||
442 | item.CurrentPermissions = uint.Parse(data["CurrentPermissions"].ToString()); | ||
443 | item.BasePermissions = uint.Parse(data["BasePermissions"].ToString()); | ||
444 | item.EveryOnePermissions = uint.Parse(data["EveryOnePermissions"].ToString()); | ||
445 | item.GroupPermissions = uint.Parse(data["GroupPermissions"].ToString()); | ||
446 | item.GroupID = new UUID(data["GroupID"].ToString()); | ||
447 | item.GroupOwned = bool.Parse(data["GroupOwned"].ToString()); | ||
448 | item.SalePrice = int.Parse(data["SalePrice"].ToString()); | ||
449 | item.SaleType = byte.Parse(data["SaleType"].ToString()); | ||
450 | item.Flags = uint.Parse(data["Flags"].ToString()); | ||
451 | item.CreationDate = int.Parse(data["CreationDate"].ToString()); | ||
452 | |||
453 | return item; | ||
454 | } | ||
381 | } | 455 | } |
382 | } | 456 | } |
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index 40acd6d..b9ccd7e 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -490,7 +490,7 @@ namespace OpenSim.Services.Connectors | |||
490 | return replyData; | 490 | return replyData; |
491 | } | 491 | } |
492 | 492 | ||
493 | InventoryFolderBase BuildFolder(Dictionary<string,object> data) | 493 | private InventoryFolderBase BuildFolder(Dictionary<string,object> data) |
494 | { | 494 | { |
495 | InventoryFolderBase folder = new InventoryFolderBase(); | 495 | InventoryFolderBase folder = new InventoryFolderBase(); |
496 | 496 | ||
@@ -504,7 +504,7 @@ namespace OpenSim.Services.Connectors | |||
504 | return folder; | 504 | return folder; |
505 | } | 505 | } |
506 | 506 | ||
507 | InventoryItemBase BuildItem(Dictionary<string,object> data) | 507 | private InventoryItemBase BuildItem(Dictionary<string,object> data) |
508 | { | 508 | { |
509 | InventoryItemBase item = new InventoryItemBase(); | 509 | InventoryItemBase item = new InventoryItemBase(); |
510 | 510 | ||
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 86815e5..a500593 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -46,10 +46,18 @@ namespace OpenSim.Services.GridService | |||
46 | LogManager.GetLogger( | 46 | LogManager.GetLogger( |
47 | MethodBase.GetCurrentMethod().DeclaringType); | 47 | MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | protected bool m_AllowDuplicateNames = false; | ||
50 | |||
49 | public GridService(IConfigSource config) | 51 | public GridService(IConfigSource config) |
50 | : base(config) | 52 | : base(config) |
51 | { | 53 | { |
52 | m_log.DebugFormat("[GRID SERVICE]: Starting..."); | 54 | m_log.DebugFormat("[GRID SERVICE]: Starting..."); |
55 | |||
56 | IConfig gridConfig = config.Configs["GridService"]; | ||
57 | if (gridConfig != null) | ||
58 | { | ||
59 | m_AllowDuplicateNames = gridConfig.GetBoolean("AllowDuplicateNames", m_AllowDuplicateNames); | ||
60 | } | ||
53 | } | 61 | } |
54 | 62 | ||
55 | #region IGridService | 63 | #region IGridService |
@@ -82,6 +90,23 @@ namespace OpenSim.Services.GridService | |||
82 | } | 90 | } |
83 | } | 91 | } |
84 | 92 | ||
93 | if (!m_AllowDuplicateNames) | ||
94 | { | ||
95 | List<RegionData> dupe = m_Database.Get(regionInfos.RegionName, scopeID); | ||
96 | if (dupe != null && dupe.Count > 0) | ||
97 | { | ||
98 | foreach (RegionData d in dupe) | ||
99 | { | ||
100 | if (d.RegionID != regionInfos.RegionID) | ||
101 | { | ||
102 | m_log.WarnFormat("[GRID SERVICE]: Region {0} tried to register duplicate name with ID {1}.", | ||
103 | regionInfos.RegionName, regionInfos.RegionID); | ||
104 | return false; | ||
105 | } | ||
106 | } | ||
107 | } | ||
108 | } | ||
109 | |||
85 | // Everything is ok, let's register | 110 | // Everything is ok, let's register |
86 | RegionData rdata = RegionInfo2RegionData(regionInfos); | 111 | RegionData rdata = RegionInfo2RegionData(regionInfos); |
87 | rdata.ScopeID = scopeID; | 112 | rdata.ScopeID = scopeID; |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index b78433f..8b79502 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -924,7 +924,7 @@ namespace OpenSim.Tests.Common.Mock | |||
924 | { | 924 | { |
925 | } | 925 | } |
926 | 926 | ||
927 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 927 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
928 | { | 928 | { |
929 | } | 929 | } |
930 | 930 | ||
@@ -1194,6 +1194,14 @@ namespace OpenSim.Tests.Common.Mock | |||
1194 | 1194 | ||
1195 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | 1195 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) |
1196 | { | 1196 | { |
1197 | } | ||
1198 | |||
1199 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1200 | { | ||
1201 | } | ||
1202 | |||
1203 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1204 | { | ||
1197 | } | 1205 | } |
1198 | } | 1206 | } |
1199 | } | 1207 | } |
@@ -13,10 +13,14 @@ If it breaks, you get to keep *both* pieces. | |||
13 | == Installation on Windows == | 13 | == Installation on Windows == |
14 | 14 | ||
15 | Prereqs: | 15 | Prereqs: |
16 | 16 | * runprebuild.bat | |
17 | * Load OpenSim.sln into Visual Studio .NET and build the solution. | 17 | * Load OpenSim.sln into Visual Studio .NET and build the solution. |
18 | * chdir bin | 18 | * chdir bin |
19 | * edit OpenSim.ini and appropriate files in bin/config-include | ||
19 | * OpenSim.exe | 20 | * OpenSim.exe |
21 | |||
22 | Helpful resources: | ||
23 | * http://opensimulator.org/wiki/Build_Instructions | ||
20 | 24 | ||
21 | See configuring OpenSim | 25 | See configuring OpenSim |
22 | 26 | ||
@@ -31,11 +35,16 @@ From the distribution type: | |||
31 | * ./runprebuild.sh | 35 | * ./runprebuild.sh |
32 | * nant | 36 | * nant |
33 | * cd bin | 37 | * cd bin |
38 | * edit OpenSim.ini and appropriate files in bin/config-include | ||
34 | * mono ./OpenSim.exe | 39 | * mono ./OpenSim.exe |
35 | 40 | ||
36 | See configuring OpenSim | 41 | See configuring OpenSim |
37 | 42 | ||
38 | == Configuring OpenSim == | 43 | == Configuring OpenSim == |
44 | Helpful resources: | ||
45 | * http://opensimulator.org/wiki/Configuration | ||
46 | * http://opensimulator.org/wiki/Configuring_Regions | ||
47 | * http://opensimulator.org/wiki/Mysql-config | ||
39 | 48 | ||
40 | When OpenSim starts for the first time, you will be prompted with a | 49 | When OpenSim starts for the first time, you will be prompted with a |
41 | series of questions that look something like: | 50 | series of questions that look something like: |
diff --git a/addon-modules/README b/addon-modules/README index 19f268f..b5bf2e0 100644 --- a/addon-modules/README +++ b/addon-modules/README | |||
@@ -3,3 +3,7 @@ In this directory you can place addon modules for OpenSim | |||
3 | Each module should be in it's own tree and the root of the tree | 3 | Each module should be in it's own tree and the root of the tree |
4 | should contain a file named "prebuild.xml", which will be included in the | 4 | should contain a file named "prebuild.xml", which will be included in the |
5 | main prebuild file. | 5 | main prebuild file. |
6 | |||
7 | The prebuild.xml should only contain <Project> and associated child tags. | ||
8 | The <?xml>, <Prebuild>, <Solution> and <Configuration> tags should not be | ||
9 | included since the add-on modules prebuild.xml will be inserted directly into the main prebuild.xml | ||
diff --git a/bin/OpenSim.Server.ini.example b/bin/OpenSim.Server.ini.example index f3d222f..d4e05af 100644 --- a/bin/OpenSim.Server.ini.example +++ b/bin/OpenSim.Server.ini.example | |||
@@ -22,6 +22,7 @@ port = 8003 | |||
22 | ; * Leave commented to diable logins to the console | 22 | ; * Leave commented to diable logins to the console |
23 | ;ConsoleUser = Test | 23 | ;ConsoleUser = Test |
24 | ;ConsolePass = secret | 24 | ;ConsolePass = secret |
25 | ;ConsolePort = 0 | ||
25 | 26 | ||
26 | ; * As an example, the below configuration precisely mimicks the legacy | 27 | ; * As an example, the below configuration precisely mimicks the legacy |
27 | ; * asset server. It is read by the asset IN connector (defined above) | 28 | ; * asset server. It is read by the asset IN connector (defined above) |
@@ -79,3 +80,4 @@ LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" | |||
79 | StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" | 80 | StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" |
80 | ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;" | 81 | ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=grid;" |
81 | Realm = "regions" | 82 | Realm = "regions" |
83 | ; AllowDuplicateNames = "True" | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 0667047..6a117c9 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -126,11 +126,16 @@ | |||
126 | ;storage_plugin = "OpenSim.Data.Null.dll" | 126 | ;storage_plugin = "OpenSim.Data.Null.dll" |
127 | 127 | ||
128 | ; --- To use sqlite as region storage: | 128 | ; --- To use sqlite as region storage: |
129 | ; NOTE: SQLite and OpenSim are not functioning properly with Mono 2.4.3 or greater. | ||
130 | ; If you are using Mono you probably should be using MySQL | ||
129 | storage_plugin = "OpenSim.Data.SQLite.dll" | 131 | storage_plugin = "OpenSim.Data.SQLite.dll" |
130 | storage_connection_string="URI=file:OpenSim.db,version=3"; | 132 | storage_connection_string="URI=file:OpenSim.db,version=3"; |
131 | 133 | ||
132 | ; --- To use MySQL storage, supply your own connectionstring (this is only an example): | 134 | ; --- To use MySQL storage, supply your own connection string (this is only an example): |
133 | ; note that the supplied account needs create privilegies if you want it to auto-create needed tables. | 135 | ; note that the supplied account needs create privilegies if you want it to auto-create needed tables. |
136 | ; | ||
137 | ; -->>> There are multiple connection strings defined in several places in this file. Check it carefully! | ||
138 | ; | ||
134 | ; storage_plugin="OpenSim.Data.MySQL.dll" | 139 | ; storage_plugin="OpenSim.Data.MySQL.dll" |
135 | ; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; | 140 | ; storage_connection_string="Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;"; |
136 | ; If you want to use a different database/server for estate data, then | 141 | ; If you want to use a different database/server for estate data, then |
@@ -263,6 +268,9 @@ | |||
263 | ; Enable JSON simulator data by setting a URI name (case sensitive) | 268 | ; Enable JSON simulator data by setting a URI name (case sensitive) |
264 | ; Stats_URI = "jsonSimStats" | 269 | ; Stats_URI = "jsonSimStats" |
265 | 270 | ||
271 | ; Make OpenSim start all regions woth logins disabled. They will need | ||
272 | ; to be enabled from the console if this is set | ||
273 | ; StartDisabled = false | ||
266 | 274 | ||
267 | [SMTP] | 275 | [SMTP] |
268 | enabled=false | 276 | enabled=false |
@@ -318,6 +326,7 @@ | |||
318 | ConsoleUser = "Test" | 326 | ConsoleUser = "Test" |
319 | ConsolePass = "secret" | 327 | ConsolePass = "secret" |
320 | http_listener_port = 9000 | 328 | http_listener_port = 9000 |
329 | console_port = 0 | ||
321 | default_location_x = 1000 | 330 | default_location_x = 1000 |
322 | default_location_y = 1000 | 331 | default_location_y = 1000 |
323 | 332 | ||
@@ -978,6 +987,11 @@ | |||
978 | ; Compile debug info (line numbers) into the script assemblies | 987 | ; Compile debug info (line numbers) into the script assemblies |
979 | CompileWithDebugInformation = true | 988 | CompileWithDebugInformation = true |
980 | 989 | ||
990 | ; Allow the user of mod* functions. This allows a script to pass messages | ||
991 | ; to a region module via the modSendCommand() function | ||
992 | ; Default is false | ||
993 | AllowMODFunctions = false | ||
994 | |||
981 | ; Allow the use of os* functions (some are dangerous) | 995 | ; Allow the use of os* functions (some are dangerous) |
982 | AllowOSFunctions = false | 996 | AllowOSFunctions = false |
983 | 997 | ||