diff options
Diffstat (limited to 'OpenSim/Region')
6 files changed, 477 insertions, 482 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 56eb508..a521ead 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
184 | bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>( | 184 | bool success = SynchronousRestObjectPoster.BeginPostObject<GridInstantMessage, bool>( |
185 | "POST", m_RestURL+"/SaveMessage/", im); | 185 | "POST", m_RestURL+"/SaveMessage/", im); |
186 | 186 | ||
187 | if(im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 187 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) |
188 | { | 188 | { |
189 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 189 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); |
190 | if (client == null) | 190 | if (client == null) |
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs index 525dda7..a1306cd 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneInventoryModule.cs | |||
@@ -1,165 +1,165 @@ | |||
1 | /** | 1 | /** |
2 | * Copyright (c) 2008, Contributors. All rights reserved. | 2 | * Copyright (c) 2008, Contributors. All rights reserved. |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without modification, | 5 | * Redistribution and use in source and binary forms, with or without modification, |
6 | * are permitted provided that the following conditions are met: | 6 | * are permitted provided that the following conditions are met: |
7 | * | 7 | * |
8 | * * Redistributions of source code must retain the above copyright notice, | 8 | * * Redistributions of source code must retain the above copyright notice, |
9 | * this list of conditions and the following disclaimer. | 9 | * this list of conditions and the following disclaimer. |
10 | * * Redistributions in binary form must reproduce the above copyright notice, | 10 | * * Redistributions in binary form must reproduce the above copyright notice, |
11 | * this list of conditions and the following disclaimer in the documentation | 11 | * this list of conditions and the following disclaimer in the documentation |
12 | * and/or other materials provided with the distribution. | 12 | * and/or other materials provided with the distribution. |
13 | * * Neither the name of the Organizations nor the names of Individual | 13 | * * Neither the name of the Organizations nor the names of Individual |
14 | * Contributors may be used to endorse or promote products derived from | 14 | * Contributors may be used to endorse or promote products derived from |
15 | * this software without specific prior written permission. | 15 | * this software without specific prior written permission. |
16 | * | 16 | * |
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
20 | * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 20 | * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | 21 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
22 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | 22 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | 23 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
24 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 24 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
25 | * OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections; | 30 | using System.Collections; |
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using OpenMetaverse; | 35 | using OpenMetaverse; |
36 | using OpenSim.Data; | 36 | using OpenSim.Data; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | using OpenSim.Framework.Communications.Cache; |
40 | using OpenSim.Framework.Communications.Services; | 40 | using OpenSim.Framework.Communications.Services; |
41 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; | 41 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; |
42 | using LLSDHelpers = OpenSim.Framework.Communications.Capabilities.LLSDHelpers; | 42 | using LLSDHelpers = OpenSim.Framework.Communications.Capabilities.LLSDHelpers; |
43 | using OpenSim.Framework.Servers; | 43 | using OpenSim.Framework.Servers; |
44 | using OpenSim.Framework.Servers.Interfaces; | 44 | using OpenSim.Framework.Servers.Interfaces; |
45 | using OpenSim.Region.Framework.Interfaces; | 45 | using OpenSim.Region.Framework.Interfaces; |
46 | using OpenSim.Region.Framework.Scenes; | 46 | using OpenSim.Region.Framework.Scenes; |
47 | using OpenSim.Region.CoreModules.Communications.REST; | 47 | using OpenSim.Region.CoreModules.Communications.REST; |
48 | 48 | ||
49 | using OpenMetaverse.StructuredData; | 49 | using OpenMetaverse.StructuredData; |
50 | 50 | ||
51 | namespace OpenSim.Region.CoreModules.Hypergrid | 51 | namespace OpenSim.Region.CoreModules.Hypergrid |
52 | { | 52 | { |
53 | public class HGStandaloneInventoryModule : IRegionModule | 53 | public class HGStandaloneInventoryModule : IRegionModule |
54 | { | 54 | { |
55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 55 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
56 | private static bool initialized = false; | 56 | private static bool initialized = false; |
57 | private static bool enabled = false; | 57 | private static bool enabled = false; |
58 | 58 | ||
59 | private bool m_doLookup = false; | 59 | private bool m_doLookup = false; |
60 | Scene m_scene; | 60 | Scene m_scene; |
61 | HGInventoryService m_inventoryService; | 61 | HGInventoryService m_inventoryService; |
62 | InventoryServiceBase m_inventoryBase; | 62 | InventoryServiceBase m_inventoryBase; |
63 | 63 | ||
64 | public bool DoLookup | 64 | public bool DoLookup |
65 | { | 65 | { |
66 | get { return m_doLookup; } | 66 | get { return m_doLookup; } |
67 | set { m_doLookup = value; } | 67 | set { m_doLookup = value; } |
68 | } | 68 | } |
69 | 69 | ||
70 | #region IRegionModule interface | 70 | #region IRegionModule interface |
71 | 71 | ||
72 | public void Initialise(Scene scene, IConfigSource config) | 72 | public void Initialise(Scene scene, IConfigSource config) |
73 | { | 73 | { |
74 | if (!initialized) | 74 | if (!initialized) |
75 | { | 75 | { |
76 | initialized = true; | 76 | initialized = true; |
77 | m_scene = scene; | 77 | m_scene = scene; |
78 | 78 | ||
79 | // This module is only on for standalones | 79 | // This module is only on for standalones |
80 | enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); | 80 | enabled = !config.Configs["Startup"].GetBoolean("gridmode", true) && config.Configs["Startup"].GetBoolean("hypergrid", false); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | public void PostInitialise() | 84 | public void PostInitialise() |
85 | { | 85 | { |
86 | if (enabled) | 86 | if (enabled) |
87 | { | 87 | { |
88 | m_log.Info("[HGStandaloneInvModule]: Starting..."); | 88 | m_log.Info("[HGStandaloneInvModule]: Starting..."); |
89 | //m_inventoryService = new InventoryService(m_scene); | 89 | //m_inventoryService = new InventoryService(m_scene); |
90 | m_inventoryBase = (InventoryServiceBase)m_scene.CommsManager.SecureInventoryService; | 90 | m_inventoryBase = (InventoryServiceBase)m_scene.CommsManager.SecureInventoryService; |
91 | 91 | ||
92 | m_inventoryService = new HGInventoryService(m_inventoryBase, | 92 | m_inventoryService = new HGInventoryService(m_inventoryBase, |
93 | ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin, | 93 | ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin, |
94 | (UserManagerBase)m_scene.CommsManager.UserService, m_scene.CommsManager.HttpServer, | 94 | (UserManagerBase)m_scene.CommsManager.UserService, m_scene.CommsManager.HttpServer, |
95 | m_scene.CommsManager.NetworkServersInfo.InventoryURL); | 95 | m_scene.CommsManager.NetworkServersInfo.InventoryURL); |
96 | 96 | ||
97 | AddHttpHandlers(m_scene.CommsManager.HttpServer); | 97 | AddHttpHandlers(m_scene.CommsManager.HttpServer); |
98 | m_inventoryService.AddHttpHandlers(); | 98 | m_inventoryService.AddHttpHandlers(); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | 101 | ||
102 | public void Close() | 102 | public void Close() |
103 | { | 103 | { |
104 | } | 104 | } |
105 | 105 | ||
106 | public string Name | 106 | public string Name |
107 | { | 107 | { |
108 | get { return "HGStandaloneInventoryModule"; } | 108 | get { return "HGStandaloneInventoryModule"; } |
109 | } | 109 | } |
110 | 110 | ||
111 | public bool IsSharedModule | 111 | public bool IsSharedModule |
112 | { | 112 | { |
113 | get { return true; } | 113 | get { return true; } |
114 | } | 114 | } |
115 | 115 | ||
116 | #endregion | 116 | #endregion |
117 | 117 | ||
118 | public virtual void AddHttpHandlers(IHttpServer httpServer) | 118 | public virtual void AddHttpHandlers(IHttpServer httpServer) |
119 | { | 119 | { |
120 | 120 | ||
121 | httpServer.AddStreamHandler( | 121 | httpServer.AddStreamHandler( |
122 | new RestDeserialiseSecureHandler<Guid, InventoryCollection>( | 122 | new RestDeserialiseSecureHandler<Guid, InventoryCollection>( |
123 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory, CheckAuthSession)); | 123 | "POST", "/GetInventory/", m_inventoryService.GetUserInventory, CheckAuthSession)); |
124 | 124 | ||
125 | httpServer.AddStreamHandler( | 125 | httpServer.AddStreamHandler( |
126 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | 126 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( |
127 | "POST", "/NewFolder/", m_inventoryBase.AddFolder, CheckAuthSession)); | 127 | "POST", "/NewFolder/", m_inventoryBase.AddFolder, CheckAuthSession)); |
128 | 128 | ||
129 | httpServer.AddStreamHandler( | 129 | httpServer.AddStreamHandler( |
130 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | 130 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( |
131 | "POST", "/UpdateFolder/", m_inventoryBase.UpdateFolder, CheckAuthSession)); | 131 | "POST", "/UpdateFolder/", m_inventoryBase.UpdateFolder, CheckAuthSession)); |
132 | 132 | ||
133 | httpServer.AddStreamHandler( | 133 | httpServer.AddStreamHandler( |
134 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | 134 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( |
135 | "POST", "/MoveFolder/", m_inventoryBase.MoveFolder, CheckAuthSession)); | 135 | "POST", "/MoveFolder/", m_inventoryBase.MoveFolder, CheckAuthSession)); |
136 | 136 | ||
137 | httpServer.AddStreamHandler( | 137 | httpServer.AddStreamHandler( |
138 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( | 138 | new RestDeserialiseSecureHandler<InventoryFolderBase, bool>( |
139 | "POST", "/PurgeFolder/", m_inventoryBase.PurgeFolder, CheckAuthSession)); | 139 | "POST", "/PurgeFolder/", m_inventoryBase.PurgeFolder, CheckAuthSession)); |
140 | 140 | ||
141 | httpServer.AddStreamHandler( | 141 | httpServer.AddStreamHandler( |
142 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( | 142 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( |
143 | "POST", "/NewItem/", m_inventoryBase.AddItem, CheckAuthSession)); | 143 | "POST", "/NewItem/", m_inventoryBase.AddItem, CheckAuthSession)); |
144 | 144 | ||
145 | httpServer.AddStreamHandler( | 145 | httpServer.AddStreamHandler( |
146 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( | 146 | new RestDeserialiseSecureHandler<InventoryItemBase, bool>( |
147 | "POST", "/DeleteItem/", m_inventoryBase.DeleteItem, CheckAuthSession)); | 147 | "POST", "/DeleteItem/", m_inventoryBase.DeleteItem, CheckAuthSession)); |
148 | 148 | ||
149 | } | 149 | } |
150 | 150 | ||
151 | /// <summary> | 151 | /// <summary> |
152 | /// Check that the source of an inventory request for a particular agent is a current session belonging to | 152 | /// Check that the source of an inventory request for a particular agent is a current session belonging to |
153 | /// that agent. | 153 | /// that agent. |
154 | /// </summary> | 154 | /// </summary> |
155 | /// <param name="session_id"></param> | 155 | /// <param name="session_id"></param> |
156 | /// <param name="avatar_id"></param> | 156 | /// <param name="avatar_id"></param> |
157 | /// <returns></returns> | 157 | /// <returns></returns> |
158 | public bool CheckAuthSession(string session_id, string avatar_id) | 158 | public bool CheckAuthSession(string session_id, string avatar_id) |
159 | { | 159 | { |
160 | return true; | 160 | return true; |
161 | } | 161 | } |
162 | 162 | ||
163 | } | 163 | } |
164 | 164 | ||
165 | } | 165 | } |
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs index 9e134be..f0e957b 100644 --- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs +++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs | |||
@@ -1,253 +1,253 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSimulator Project nor the | 12 | * * Neither the name of the OpenSimulator Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Text.RegularExpressions; | 33 | using System.Text.RegularExpressions; |
34 | using log4net; | 34 | using log4net; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Framework.Communications.Services; | 39 | using OpenSim.Framework.Communications.Services; |
40 | using OpenSim.Framework.Communications.Cache; | 40 | using OpenSim.Framework.Communications.Cache; |
41 | using OpenSim.Framework.Communications.Capabilities; | 41 | using OpenSim.Framework.Communications.Capabilities; |
42 | using OpenSim.Framework.Servers.Interfaces; | 42 | using OpenSim.Framework.Servers.Interfaces; |
43 | using OpenSim.Region.Framework.Scenes; | 43 | using OpenSim.Region.Framework.Scenes; |
44 | using OpenSim.Region.Framework.Interfaces; | 44 | using OpenSim.Region.Framework.Interfaces; |
45 | 45 | ||
46 | namespace OpenSim.Region.CoreModules.Hypergrid | 46 | namespace OpenSim.Region.CoreModules.Hypergrid |
47 | { | 47 | { |
48 | public class HGStandaloneLoginModule : IRegionModule, ILoginServiceToRegionsConnector | 48 | public class HGStandaloneLoginModule : IRegionModule, ILoginServiceToRegionsConnector |
49 | { | 49 | { |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | protected List<Scene> m_scenes = new List<Scene>(); | 52 | protected List<Scene> m_scenes = new List<Scene>(); |
53 | protected Scene m_firstScene; | 53 | protected Scene m_firstScene; |
54 | 54 | ||
55 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode | 55 | protected bool m_enabled = false; // Module is only enabled if running in standalone mode |
56 | 56 | ||
57 | 57 | ||
58 | public bool RegionLoginsEnabled | 58 | public bool RegionLoginsEnabled |
59 | { | 59 | { |
60 | get | 60 | get |
61 | { | 61 | { |
62 | if (m_firstScene != null) | 62 | if (m_firstScene != null) |
63 | { | 63 | { |
64 | return m_firstScene.CommsManager.GridService.RegionLoginsEnabled; | 64 | return m_firstScene.CommsManager.GridService.RegionLoginsEnabled; |
65 | } | 65 | } |
66 | else | 66 | else |
67 | { | 67 | { |
68 | return false; | 68 | return false; |
69 | } | 69 | } |
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | protected HGLoginAuthService m_loginService; | 73 | protected HGLoginAuthService m_loginService; |
74 | 74 | ||
75 | #region IRegionModule Members | 75 | #region IRegionModule Members |
76 | 76 | ||
77 | public void Initialise(Scene scene, IConfigSource source) | 77 | public void Initialise(Scene scene, IConfigSource source) |
78 | { | 78 | { |
79 | if (m_firstScene == null) | 79 | if (m_firstScene == null) |
80 | { | 80 | { |
81 | m_firstScene = scene; | 81 | m_firstScene = scene; |
82 | 82 | ||
83 | IConfig startupConfig = source.Configs["Startup"]; | 83 | IConfig startupConfig = source.Configs["Startup"]; |
84 | if (startupConfig != null) | 84 | if (startupConfig != null) |
85 | { | 85 | { |
86 | m_enabled = !startupConfig.GetBoolean("gridmode", false); | 86 | m_enabled = !startupConfig.GetBoolean("gridmode", false); |
87 | } | 87 | } |
88 | 88 | ||
89 | if (m_enabled) | 89 | if (m_enabled) |
90 | { | 90 | { |
91 | m_log.Debug("[HGLogin] HGlogin module enabled"); | 91 | m_log.Debug("[HGLogin] HGlogin module enabled"); |
92 | bool authenticate = true; | 92 | bool authenticate = true; |
93 | string welcomeMessage = "Welcome to OpenSim"; | 93 | string welcomeMessage = "Welcome to OpenSim"; |
94 | IConfig standaloneConfig = source.Configs["StandAlone"]; | 94 | IConfig standaloneConfig = source.Configs["StandAlone"]; |
95 | if (standaloneConfig != null) | 95 | if (standaloneConfig != null) |
96 | { | 96 | { |
97 | authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true); | 97 | authenticate = standaloneConfig.GetBoolean("accounts_authenticate", true); |
98 | welcomeMessage = standaloneConfig.GetString("welcome_message"); | 98 | welcomeMessage = standaloneConfig.GetString("welcome_message"); |
99 | } | 99 | } |
100 | 100 | ||
101 | //TODO: fix casting. | 101 | //TODO: fix casting. |
102 | LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder; | 102 | LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder; |
103 | 103 | ||
104 | IHttpServer httpServer = m_firstScene.CommsManager.HttpServer; | 104 | IHttpServer httpServer = m_firstScene.CommsManager.HttpServer; |
105 | 105 | ||
106 | //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference | 106 | //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference |
107 | m_loginService = new HGLoginAuthService((UserManagerBase)m_firstScene.CommsManager.UserService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this); | 107 | m_loginService = new HGLoginAuthService((UserManagerBase)m_firstScene.CommsManager.UserService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this); |
108 | 108 | ||
109 | httpServer.AddXmlRPCHandler("hg_login", m_loginService.XmlRpcLoginMethod); | 109 | httpServer.AddXmlRPCHandler("hg_login", m_loginService.XmlRpcLoginMethod); |
110 | httpServer.AddXmlRPCHandler("hg_new_auth_key", m_loginService.XmlRpcGenerateKeyMethod); | 110 | httpServer.AddXmlRPCHandler("hg_new_auth_key", m_loginService.XmlRpcGenerateKeyMethod); |
111 | httpServer.AddXmlRPCHandler("hg_verify_auth_key", m_loginService.XmlRpcVerifyKeyMethod); | 111 | httpServer.AddXmlRPCHandler("hg_verify_auth_key", m_loginService.XmlRpcVerifyKeyMethod); |
112 | 112 | ||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | if (m_enabled) | 116 | if (m_enabled) |
117 | { | 117 | { |
118 | AddScene(scene); | 118 | AddScene(scene); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | public void PostInitialise() | 122 | public void PostInitialise() |
123 | { | 123 | { |
124 | 124 | ||
125 | } | 125 | } |
126 | 126 | ||
127 | public void Close() | 127 | public void Close() |
128 | { | 128 | { |
129 | 129 | ||
130 | } | 130 | } |
131 | 131 | ||
132 | public string Name | 132 | public string Name |
133 | { | 133 | { |
134 | get { return "HGStandaloneLoginModule"; } | 134 | get { return "HGStandaloneLoginModule"; } |
135 | } | 135 | } |
136 | 136 | ||
137 | public bool IsSharedModule | 137 | public bool IsSharedModule |
138 | { | 138 | { |
139 | get { return true; } | 139 | get { return true; } |
140 | } | 140 | } |
141 | 141 | ||
142 | #endregion | 142 | #endregion |
143 | 143 | ||
144 | protected void AddScene(Scene scene) | 144 | protected void AddScene(Scene scene) |
145 | { | 145 | { |
146 | lock (m_scenes) | 146 | lock (m_scenes) |
147 | { | 147 | { |
148 | if (!m_scenes.Contains(scene)) | 148 | if (!m_scenes.Contains(scene)) |
149 | { | 149 | { |
150 | m_scenes.Add(scene); | 150 | m_scenes.Add(scene); |
151 | } | 151 | } |
152 | } | 152 | } |
153 | } | 153 | } |
154 | 154 | ||
155 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent) | 155 | public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent) |
156 | { | 156 | { |
157 | return true; | 157 | return true; |
158 | } | 158 | } |
159 | 159 | ||
160 | public void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message) | 160 | public void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message) |
161 | { | 161 | { |
162 | Scene scene; | 162 | Scene scene; |
163 | if (TryGetRegion(regionHandle, out scene)) | 163 | if (TryGetRegion(regionHandle, out scene)) |
164 | { | 164 | { |
165 | scene.HandleLogOffUserFromGrid(AvatarID, RegionSecret, message); | 165 | scene.HandleLogOffUserFromGrid(AvatarID, RegionSecret, message); |
166 | } | 166 | } |
167 | } | 167 | } |
168 | 168 | ||
169 | public RegionInfo RequestNeighbourInfo(ulong regionhandle) | 169 | public RegionInfo RequestNeighbourInfo(ulong regionhandle) |
170 | { | 170 | { |
171 | Scene scene; | 171 | Scene scene; |
172 | if (TryGetRegion(regionhandle, out scene)) | 172 | if (TryGetRegion(regionhandle, out scene)) |
173 | { | 173 | { |
174 | return scene.RegionInfo; | 174 | return scene.RegionInfo; |
175 | } | 175 | } |
176 | return null; | 176 | return null; |
177 | } | 177 | } |
178 | 178 | ||
179 | public RegionInfo RequestClosestRegion(string region) | 179 | public RegionInfo RequestClosestRegion(string region) |
180 | { | 180 | { |
181 | Scene scene; | 181 | Scene scene; |
182 | if (TryGetRegion(region, out scene)) | 182 | if (TryGetRegion(region, out scene)) |
183 | { | 183 | { |
184 | return scene.RegionInfo; | 184 | return scene.RegionInfo; |
185 | } | 185 | } |
186 | return null; | 186 | return null; |
187 | } | 187 | } |
188 | 188 | ||
189 | public RegionInfo RequestNeighbourInfo(UUID regionID) | 189 | public RegionInfo RequestNeighbourInfo(UUID regionID) |
190 | { | 190 | { |
191 | Scene scene; | 191 | Scene scene; |
192 | if (TryGetRegion(regionID, out scene)) | 192 | if (TryGetRegion(regionID, out scene)) |
193 | { | 193 | { |
194 | return scene.RegionInfo; | 194 | return scene.RegionInfo; |
195 | } | 195 | } |
196 | return null; | 196 | return null; |
197 | } | 197 | } |
198 | 198 | ||
199 | protected bool TryGetRegion(ulong regionHandle, out Scene scene) | 199 | protected bool TryGetRegion(ulong regionHandle, out Scene scene) |
200 | { | 200 | { |
201 | lock (m_scenes) | 201 | lock (m_scenes) |
202 | { | 202 | { |
203 | foreach (Scene nextScene in m_scenes) | 203 | foreach (Scene nextScene in m_scenes) |
204 | { | 204 | { |
205 | if (nextScene.RegionInfo.RegionHandle == regionHandle) | 205 | if (nextScene.RegionInfo.RegionHandle == regionHandle) |
206 | { | 206 | { |
207 | scene = nextScene; | 207 | scene = nextScene; |
208 | return true; | 208 | return true; |
209 | } | 209 | } |
210 | } | 210 | } |
211 | } | 211 | } |
212 | 212 | ||
213 | scene = null; | 213 | scene = null; |
214 | return false; | 214 | return false; |
215 | } | 215 | } |
216 | 216 | ||
217 | protected bool TryGetRegion(UUID regionID, out Scene scene) | 217 | protected bool TryGetRegion(UUID regionID, out Scene scene) |
218 | { | 218 | { |
219 | lock (m_scenes) | 219 | lock (m_scenes) |
220 | { | 220 | { |
221 | foreach (Scene nextScene in m_scenes) | 221 | foreach (Scene nextScene in m_scenes) |
222 | { | 222 | { |
223 | if (nextScene.RegionInfo.RegionID == regionID) | 223 | if (nextScene.RegionInfo.RegionID == regionID) |
224 | { | 224 | { |
225 | scene = nextScene; | 225 | scene = nextScene; |
226 | return true; | 226 | return true; |
227 | } | 227 | } |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | scene = null; | 231 | scene = null; |
232 | return false; | 232 | return false; |
233 | } | 233 | } |
234 | 234 | ||
235 | protected bool TryGetRegion(string regionName, out Scene scene) | 235 | protected bool TryGetRegion(string regionName, out Scene scene) |
236 | { | 236 | { |
237 | lock (m_scenes) | 237 | lock (m_scenes) |
238 | { | 238 | { |
239 | foreach (Scene nextScene in m_scenes) | 239 | foreach (Scene nextScene in m_scenes) |
240 | { | 240 | { |
241 | if (nextScene.RegionInfo.RegionName == regionName) | 241 | if (nextScene.RegionInfo.RegionName == regionName) |
242 | { | 242 | { |
243 | scene = nextScene; | 243 | scene = nextScene; |
244 | return true; | 244 | return true; |
245 | } | 245 | } |
246 | } | 246 | } |
247 | } | 247 | } |
248 | 248 | ||
249 | scene = null; | 249 | scene = null; |
250 | return false; | 250 | return false; |
251 | } | 251 | } |
252 | } | 252 | } |
253 | } | 253 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index dedd37f..f9059e0 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -66,18 +66,17 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
66 | /// <param name="data"></param> | 66 | /// <param name="data"></param> |
67 | public void ReturnData(UUID id, byte[] data) | 67 | public void ReturnData(UUID id, byte[] data) |
68 | { | 68 | { |
69 | DynamicTextureUpdater updater = null; | ||
69 | 70 | ||
70 | DynamicTextureUpdater updater = null; | 71 | lock (Updaters) |
71 | |||
72 | lock(Updaters) | ||
73 | { | 72 | { |
74 | if (Updaters.ContainsKey(id)) | 73 | if (Updaters.ContainsKey(id)) |
75 | { | 74 | { |
76 | updater = Updaters[id]; | 75 | updater = Updaters[id]; |
77 | } | 76 | } |
78 | } | 77 | } |
79 | 78 | ||
80 | if(updater != null) | 79 | if (updater != null) |
81 | { | 80 | { |
82 | if (RegisteredScenes.ContainsKey(updater.SimUUID)) | 81 | if (RegisteredScenes.ContainsKey(updater.SimUUID)) |
83 | { | 82 | { |
@@ -86,27 +85,26 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
86 | } | 85 | } |
87 | } | 86 | } |
88 | 87 | ||
89 | if(updater.UpdateTimer == 0) | 88 | if (updater.UpdateTimer == 0) |
90 | { | 89 | { |
91 | lock(Updaters) | 90 | lock (Updaters) |
92 | { | 91 | { |
93 | if (!Updaters.ContainsKey(updater.UpdaterID)) | 92 | if (!Updaters.ContainsKey(updater.UpdaterID)) |
94 | { | 93 | { |
95 | Updaters.Remove(updater.UpdaterID); | 94 | Updaters.Remove(updater.UpdaterID); |
96 | } | 95 | } |
97 | } | 96 | } |
98 | } | 97 | } |
99 | |||
100 | } | 98 | } |
101 | 99 | ||
102 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, | 100 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, |
103 | string extraParams, int updateTimer) | 101 | string extraParams, int updateTimer) |
104 | { | 102 | { |
105 | return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); | 103 | return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); |
106 | } | 104 | } |
107 | 105 | ||
108 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, | 106 | public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url, |
109 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) | 107 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) |
110 | { | 108 | { |
111 | if (RenderPlugins.ContainsKey(contentType)) | 109 | if (RenderPlugins.ContainsKey(contentType)) |
112 | { | 110 | { |
@@ -123,12 +121,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
123 | updater.BlendWithOldTexture = SetBlending; | 121 | updater.BlendWithOldTexture = SetBlending; |
124 | updater.FrontAlpha = AlphaValue; | 122 | updater.FrontAlpha = AlphaValue; |
125 | 123 | ||
126 | lock(Updaters) | 124 | lock (Updaters) |
127 | { | 125 | { |
128 | if (!Updaters.ContainsKey(updater.UpdaterID)) | 126 | if (!Updaters.ContainsKey(updater.UpdaterID)) |
129 | { | 127 | { |
130 | Updaters.Add(updater.UpdaterID, updater); | 128 | Updaters.Add(updater.UpdaterID, updater); |
131 | } | 129 | } |
132 | } | 130 | } |
133 | 131 | ||
134 | RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); | 132 | RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); |
@@ -138,13 +136,13 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
138 | } | 136 | } |
139 | 137 | ||
140 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, | 138 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, |
141 | string extraParams, int updateTimer) | 139 | string extraParams, int updateTimer) |
142 | { | 140 | { |
143 | return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); | 141 | return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); |
144 | } | 142 | } |
145 | 143 | ||
146 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, | 144 | public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, |
147 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) | 145 | string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) |
148 | { | 146 | { |
149 | if (RenderPlugins.ContainsKey(contentType)) | 147 | if (RenderPlugins.ContainsKey(contentType)) |
150 | { | 148 | { |
@@ -159,12 +157,12 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
159 | updater.BlendWithOldTexture = SetBlending; | 157 | updater.BlendWithOldTexture = SetBlending; |
160 | updater.FrontAlpha = AlphaValue; | 158 | updater.FrontAlpha = AlphaValue; |
161 | 159 | ||
162 | lock(Updaters) | 160 | lock (Updaters) |
163 | { | 161 | { |
164 | if (!Updaters.ContainsKey(updater.UpdaterID)) | 162 | if (!Updaters.ContainsKey(updater.UpdaterID)) |
165 | { | 163 | { |
166 | Updaters.Add(updater.UpdaterID, updater); | 164 | Updaters.Add(updater.UpdaterID, updater); |
167 | } | 165 | } |
168 | } | 166 | } |
169 | 167 | ||
170 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); | 168 | RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); |
@@ -173,7 +171,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
173 | return UUID.Zero; | 171 | return UUID.Zero; |
174 | } | 172 | } |
175 | 173 | ||
176 | |||
177 | public void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, | 174 | public void GetDrawStringSize(string contentType, string text, string fontName, int fontSize, |
178 | out double xSize, out double ySize) | 175 | out double xSize, out double ySize) |
179 | { | 176 | { |
@@ -307,7 +304,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
307 | part.ScheduleFullUpdate(); | 304 | part.ScheduleFullUpdate(); |
308 | 305 | ||
309 | scene.CommsManager.AssetCache.ExpireAsset(oldID); | 306 | scene.CommsManager.AssetCache.ExpireAsset(oldID); |
310 | |||
311 | } | 307 | } |
312 | 308 | ||
313 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) | 309 | private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3c1b87f..e32f1b4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4998,29 +4998,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4998 | 4998 | ||
4999 | if (dir.x == 0) | 4999 | if (dir.x == 0) |
5000 | { | 5000 | { |
5001 | if (dir.y == 0) | 5001 | if (dir.y == 0) |
5002 | { | 5002 | { |
5003 | // Direction vector is 0,0 so return | 5003 | // Direction vector is 0,0 so return |
5004 | // false since we're staying in the sim | 5004 | // false since we're staying in the sim |
5005 | return 0; | 5005 | return 0; |
5006 | } | 5006 | } |
5007 | else | 5007 | else |
5008 | { | 5008 | { |
5009 | // Y is the only valid direction | 5009 | // Y is the only valid direction |
5010 | edge.y = dir.y / Math.Abs(dir.y); | 5010 | edge.y = dir.y / Math.Abs(dir.y); |
5011 | } | 5011 | } |
5012 | } | 5012 | } |
5013 | else | 5013 | else |
5014 | { | 5014 | { |
5015 | LSL_Float mag; | 5015 | LSL_Float mag; |
5016 | if (dir.x > 0) | 5016 | if (dir.x > 0) |
5017 | { | 5017 | { |
5018 | mag = (Constants.RegionSize - pos.x) / dir.x; | 5018 | mag = (Constants.RegionSize - pos.x) / dir.x; |
5019 | } | 5019 | } |
5020 | else | 5020 | else |
5021 | { | 5021 | { |
5022 | mag = (pos.x/dir.x); | 5022 | mag = (pos.x/dir.x); |
5023 | } | 5023 | } |
5024 | 5024 | ||
5025 | mag = Math.Abs(mag); | 5025 | mag = Math.Abs(mag); |
5026 | 5026 | ||
@@ -5028,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5028 | 5028 | ||
5029 | if (edge.y > Constants.RegionSize || edge.y < 0) | 5029 | if (edge.y > Constants.RegionSize || edge.y < 0) |
5030 | { | 5030 | { |
5031 | // Y goes out of bounds first | 5031 | // Y goes out of bounds first |
5032 | edge.y = dir.y / Math.Abs(dir.y); | 5032 | edge.y = dir.y / Math.Abs(dir.y); |
5033 | } | 5033 | } |
5034 | else | 5034 | else |
@@ -5039,18 +5039,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5039 | } | 5039 | } |
5040 | } | 5040 | } |
5041 | 5041 | ||
5042 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); | 5042 | List<SimpleRegionInfo> neighbors = World.CommsManager.GridService.RequestNeighbours(World.RegionInfo.RegionLocX, World.RegionInfo.RegionLocY); |
5043 | 5043 | ||
5044 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; | 5044 | uint neighborX = World.RegionInfo.RegionLocX + (uint)dir.x; |
5045 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; | 5045 | uint neighborY = World.RegionInfo.RegionLocY + (uint)dir.y; |
5046 | 5046 | ||
5047 | foreach (SimpleRegionInfo sri in neighbors) | 5047 | foreach (SimpleRegionInfo sri in neighbors) |
5048 | { | 5048 | { |
5049 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) | 5049 | if (sri.RegionLocX == neighborX && sri.RegionLocY == neighborY) |
5050 | return 0; | 5050 | return 0; |
5051 | } | 5051 | } |
5052 | 5052 | ||
5053 | return 1; | 5053 | return 1; |
5054 | } | 5054 | } |
5055 | 5055 | ||
5056 | /// <summary> | 5056 | /// <summary> |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 09351fd..5353fc9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -49,7 +49,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
49 | { | 49 | { |
50 | return localID.ToString() + itemID.ToString(); | 50 | return localID.ToString() + itemID.ToString(); |
51 | } | 51 | } |
52 | |||
53 | 52 | ||
54 | private class TimerClass | 53 | private class TimerClass |
55 | { | 54 | { |