diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
20 files changed, 121 insertions, 129 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 8e2dba4..127ca1d 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -203,10 +203,10 @@ namespace Flotsam.RegionModules.AssetCache | |||
203 | m_CacheDirectoryTierLen = 4; | 203 | m_CacheDirectoryTierLen = 4; |
204 | } | 204 | } |
205 | 205 | ||
206 | MainConsole.Instance.Commands.AddCommand(Name, true, "fcache status", "fcache status", "Display cache status", HandleConsoleCommand); | 206 | MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache status", "fcache status", "Display cache status", HandleConsoleCommand); |
207 | MainConsole.Instance.Commands.AddCommand(Name, true, "fcache clear", "fcache clear [file] [memory]", "Remove all assets in the cache. If file or memory is specified then only this cache is cleared.", HandleConsoleCommand); | 207 | MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache clear", "fcache clear [file] [memory]", "Remove all assets in the cache. If file or memory is specified then only this cache is cleared.", HandleConsoleCommand); |
208 | MainConsole.Instance.Commands.AddCommand(Name, true, "fcache assets", "fcache assets", "Attempt a deep scan and cache of all assets in all scenes", HandleConsoleCommand); | 208 | MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache assets", "fcache assets", "Attempt a deep scan and cache of all assets in all scenes", HandleConsoleCommand); |
209 | MainConsole.Instance.Commands.AddCommand(Name, true, "fcache expire", "fcache expire <datetime>", "Purge cached assets older then the specified date/time", HandleConsoleCommand); | 209 | MainConsole.Instance.Commands.AddCommand("Assets", true, "fcache expire", "fcache expire <datetime>", "Purge cached assets older then the specified date/time", HandleConsoleCommand); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index bb2cd1f..3c294bb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -51,12 +51,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
51 | m_scene.RegisterModuleInterface<IDialogModule>(this); | 51 | m_scene.RegisterModuleInterface<IDialogModule>(this); |
52 | 52 | ||
53 | m_scene.AddCommand( | 53 | m_scene.AddCommand( |
54 | this, "alert", "alert <message>", | 54 | "Users", this, "alert", "alert <message>", |
55 | "Send an alert to everyone", | 55 | "Send an alert to everyone", |
56 | HandleAlertConsoleCommand); | 56 | HandleAlertConsoleCommand); |
57 | 57 | ||
58 | m_scene.AddCommand( | 58 | m_scene.AddCommand( |
59 | this, "alert-user", "alert-user <first> <last> <message>", | 59 | "Users", this, "alert-user", "alert-user <first> <last> <message>", |
60 | "Send an alert to a user", | 60 | "Send an alert to a user", |
61 | HandleAlertConsoleCommand); | 61 | HandleAlertConsoleCommand); |
62 | } | 62 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index a81f36c..2154827 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -108,7 +108,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
108 | OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; | 108 | OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted; |
109 | 109 | ||
110 | scene.AddCommand( | 110 | scene.AddCommand( |
111 | this, "load iar", | 111 | "Archiving", this, "load iar", |
112 | "load iar [-m|--merge] <first> <last> <inventory path> <password> [<IAR path>]", | 112 | "load iar [-m|--merge] <first> <last> <inventory path> <password> [<IAR path>]", |
113 | "Load user inventory archive (IAR).", | 113 | "Load user inventory archive (IAR).", |
114 | "-m|--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" | 114 | "-m|--merge is an option which merges the loaded IAR with existing inventory folders where possible, rather than always creating new ones" |
@@ -121,7 +121,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
121 | HandleLoadInvConsoleCommand); | 121 | HandleLoadInvConsoleCommand); |
122 | 122 | ||
123 | scene.AddCommand( | 123 | scene.AddCommand( |
124 | this, "save iar", | 124 | "Archiving", this, "save iar", |
125 | "save iar [-h|--home=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [-c|--creators] [-v|--verbose]", | 125 | "save iar [-h|--home=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [-c|--creators] [-v|--verbose]", |
126 | "Save user inventory archive (IAR).", | 126 | "Save user inventory archive (IAR).", |
127 | "<first> is the user's first name." + Environment.NewLine | 127 | "<first> is the user's first name." + Environment.NewLine |
@@ -349,8 +349,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
349 | { | 349 | { |
350 | try | 350 | try |
351 | { | 351 | { |
352 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); | ||
353 | |||
354 | Dictionary<string, object> options = new Dictionary<string, object>(); | 352 | Dictionary<string, object> options = new Dictionary<string, object>(); |
355 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); | 353 | OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; }); |
356 | 354 | ||
@@ -412,7 +410,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
412 | return; | 410 | return; |
413 | } | 411 | } |
414 | 412 | ||
415 | m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); | ||
416 | if (options.ContainsKey("home")) | 413 | if (options.ContainsKey("home")) |
417 | m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR"); | 414 | m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR"); |
418 | 415 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs index eb1e4b5..8101ca2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs | |||
@@ -150,7 +150,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
150 | string skillsText = String.Empty; | 150 | string skillsText = String.Empty; |
151 | string languages = String.Empty; | 151 | string languages = String.Empty; |
152 | 152 | ||
153 | Byte[] charterMember = Utils.StringToBytes("Avatar"); | 153 | UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, avatarID); |
154 | |||
155 | string name = "Avatar"; | ||
156 | int created = 0; | ||
157 | if (account != null) | ||
158 | { | ||
159 | name = account.FirstName + " " + account.LastName; | ||
160 | created = account.Created; | ||
161 | } | ||
162 | Byte[] charterMember = Utils.StringToBytes(name); | ||
154 | 163 | ||
155 | profileUrl = "No profile data"; | 164 | profileUrl = "No profile data"; |
156 | aboutText = string.Empty; | 165 | aboutText = string.Empty; |
@@ -160,7 +169,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile | |||
160 | partner = UUID.Zero; | 169 | partner = UUID.Zero; |
161 | 170 | ||
162 | remoteClient.SendAvatarProperties(avatarID, aboutText, | 171 | remoteClient.SendAvatarProperties(avatarID, aboutText, |
163 | Util.ToDateTime(0).ToString( | 172 | Util.ToDateTime(created).ToString( |
164 | "M/d/yyyy", CultureInfo.InvariantCulture), | 173 | "M/d/yyyy", CultureInfo.InvariantCulture), |
165 | charterMember, firstLifeAboutText, | 174 | charterMember, firstLifeAboutText, |
166 | (uint)(0 & 0xff), | 175 | (uint)(0 & 0xff), |
diff --git a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs index 97cd738..dbe75b5 100644 --- a/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs | |||
@@ -69,9 +69,10 @@ namespace OpenSim.Region.CoreModules.Framework | |||
69 | { | 69 | { |
70 | m_scene = scene; | 70 | m_scene = scene; |
71 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); | 71 | m_scene.RegisterModuleInterface<ICapabilitiesModule>(this); |
72 | MainConsole.Instance.Commands.AddCommand("Capabilities", false, "show caps", | 72 | |
73 | MainConsole.Instance.Commands.AddCommand("Comms", false, "show caps", | ||
73 | "show caps", | 74 | "show caps", |
74 | "Shows all registered capabilities", HandleShowCapsCommand); | 75 | "Shows all registered capabilities for users", HandleShowCapsCommand); |
75 | } | 76 | } |
76 | 77 | ||
77 | public void RegionLoaded(Scene scene) | 78 | public void RegionLoaded(Scene scene) |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 0c4ff7f..d2fe388 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
117 | string userAssetServer = string.Empty; | 117 | string userAssetServer = string.Empty; |
118 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) | 118 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) |
119 | { | 119 | { |
120 | Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); | 120 | m_assMapper.Post(assetID, avatarID, userAssetServer); |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs index 3f466be..7f8271d 100644 --- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring | |||
72 | 72 | ||
73 | m_scene = scene; | 73 | m_scene = scene; |
74 | 74 | ||
75 | m_scene.AddCommand(this, "monitor report", | 75 | m_scene.AddCommand("General", this, "monitor report", |
76 | "monitor report", | 76 | "monitor report", |
77 | "Returns a variety of statistics about the current region and/or simulator", | 77 | "Returns a variety of statistics about the current region and/or simulator", |
78 | DebugMonitors); | 78 | DebugMonitors); |
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index b4f6b5a..554af14 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
80 | // } | 80 | // } |
81 | // } | 81 | // } |
82 | //} | 82 | //} |
83 | MainConsole.Instance.Commands.AddCommand("grid", true, | 83 | MainConsole.Instance.Commands.AddCommand("Users", true, |
84 | "show names", | 84 | "show names", |
85 | "show names", | 85 | "show names", |
86 | "Show the bindings between user UUIDs and user names", | 86 | "Show the bindings between user UUIDs and user names", |
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index f367739..a6e2548 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -1210,7 +1210,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
1210 | if (homeScene.TryGetScenePresence(avatarId,out avatar)) | 1210 | if (homeScene.TryGetScenePresence(avatarId,out avatar)) |
1211 | { | 1211 | { |
1212 | KillAUser ku = new KillAUser(avatar,mod); | 1212 | KillAUser ku = new KillAUser(avatar,mod); |
1213 | Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true); | 1213 | Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true, true); |
1214 | } | 1214 | } |
1215 | } | 1215 | } |
1216 | 1216 | ||
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index 640a60b..ef9b4e0 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -151,6 +151,14 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
151 | 151 | ||
152 | #region IWorldComm Members | 152 | #region IWorldComm Members |
153 | 153 | ||
154 | public int ListenerCount | ||
155 | { | ||
156 | get | ||
157 | { | ||
158 | return m_listenerManager.ListenerCount; | ||
159 | } | ||
160 | } | ||
161 | |||
154 | /// <summary> | 162 | /// <summary> |
155 | /// Create a listen event callback with the specified filters. | 163 | /// Create a listen event callback with the specified filters. |
156 | /// The parameters localID,itemID are needed to uniquely identify | 164 | /// The parameters localID,itemID are needed to uniquely identify |
@@ -438,6 +446,18 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
438 | private int m_maxhandles; | 446 | private int m_maxhandles; |
439 | private int m_curlisteners; | 447 | private int m_curlisteners; |
440 | 448 | ||
449 | /// <summary> | ||
450 | /// Total number of listeners | ||
451 | /// </summary> | ||
452 | public int ListenerCount | ||
453 | { | ||
454 | get | ||
455 | { | ||
456 | lock (m_listeners) | ||
457 | return m_listeners.Count; | ||
458 | } | ||
459 | } | ||
460 | |||
441 | public ListenerManager(int maxlisteners, int maxhandles) | 461 | public ListenerManager(int maxlisteners, int maxhandles) |
442 | { | 462 | { |
443 | m_maxlisteners = maxlisteners; | 463 | m_maxlisteners = maxlisteners; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index 2e6ec90..c78915f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs | |||
@@ -73,14 +73,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset | |||
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||
76 | string serviceDll = assetConfig.GetString("LocalServiceModule", | 76 | string serviceDll = assetConfig.GetString("LocalServiceModule", String.Empty); |
77 | String.Empty); | ||
78 | 77 | ||
79 | if (serviceDll == String.Empty) | 78 | if (serviceDll == String.Empty) |
80 | { | 79 | { |
81 | m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService"); | 80 | m_log.Error("[LOCAL ASSET SERVICES CONNECTOR]: No LocalServiceModule named in section AssetService"); |
82 | return; | 81 | return; |
83 | } | 82 | } |
83 | else | ||
84 | { | ||
85 | m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Loading asset service at {0}", serviceDll); | ||
86 | } | ||
84 | 87 | ||
85 | Object[] args = new Object[] { source }; | 88 | Object[] args = new Object[] { source }; |
86 | m_AssetService = ServerUtils.LoadPlugin<IAssetService>(serviceDll, args); | 89 | m_AssetService = ServerUtils.LoadPlugin<IAssetService>(serviceDll, args); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs index 3c36799..540f33a 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/LocalGridServiceConnector.cs | |||
@@ -48,8 +48,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
48 | LogManager.GetLogger( | 48 | LogManager.GetLogger( |
49 | MethodBase.GetCurrentMethod().DeclaringType); | 49 | MethodBase.GetCurrentMethod().DeclaringType); |
50 | 50 | ||
51 | private static LocalGridServicesConnector m_MainInstance; | ||
52 | |||
53 | private IGridService m_GridService; | 51 | private IGridService m_GridService; |
54 | private Dictionary<UUID, RegionCache> m_LocalCache = new Dictionary<UUID, RegionCache>(); | 52 | private Dictionary<UUID, RegionCache> m_LocalCache = new Dictionary<UUID, RegionCache>(); |
55 | 53 | ||
@@ -62,7 +60,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
62 | public LocalGridServicesConnector(IConfigSource source) | 60 | public LocalGridServicesConnector(IConfigSource source) |
63 | { | 61 | { |
64 | m_log.Debug("[LOCAL GRID CONNECTOR]: LocalGridServicesConnector instantiated"); | 62 | m_log.Debug("[LOCAL GRID CONNECTOR]: LocalGridServicesConnector instantiated"); |
65 | m_MainInstance = this; | ||
66 | InitialiseService(source); | 63 | InitialiseService(source); |
67 | } | 64 | } |
68 | 65 | ||
@@ -87,7 +84,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
87 | if (name == Name) | 84 | if (name == Name) |
88 | { | 85 | { |
89 | InitialiseService(source); | 86 | InitialiseService(source); |
90 | m_MainInstance = this; | ||
91 | m_Enabled = true; | 87 | m_Enabled = true; |
92 | m_log.Info("[LOCAL GRID CONNECTOR]: Local grid connector enabled"); | 88 | m_log.Info("[LOCAL GRID CONNECTOR]: Local grid connector enabled"); |
93 | } | 89 | } |
@@ -126,12 +122,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
126 | 122 | ||
127 | public void PostInitialise() | 123 | public void PostInitialise() |
128 | { | 124 | { |
129 | if (m_MainInstance == this) | 125 | MainConsole.Instance.Commands.AddCommand("Regions", false, "show neighbours", |
130 | { | 126 | "show neighbours", |
131 | MainConsole.Instance.Commands.AddCommand("LocalGridConnector", false, "show neighbours", | 127 | "Shows the local regions' neighbours", NeighboursCommand); |
132 | "show neighbours", | ||
133 | "Shows the local regions' neighbours", NeighboursCommand); | ||
134 | } | ||
135 | } | 128 | } |
136 | 129 | ||
137 | public void Close() | 130 | public void Close() |
@@ -143,22 +136,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
143 | if (m_Enabled) | 136 | if (m_Enabled) |
144 | scene.RegisterModuleInterface<IGridService>(this); | 137 | scene.RegisterModuleInterface<IGridService>(this); |
145 | 138 | ||
146 | if (m_MainInstance == this) | 139 | if (m_LocalCache.ContainsKey(scene.RegionInfo.RegionID)) |
147 | { | 140 | m_log.ErrorFormat("[LOCAL GRID CONNECTOR]: simulator seems to have more than one region with the same UUID. Please correct this!"); |
148 | if (m_LocalCache.ContainsKey(scene.RegionInfo.RegionID)) | 141 | else |
149 | m_log.ErrorFormat("[LOCAL GRID CONNECTOR]: simulator seems to have more than one region with the same UUID. Please correct this!"); | 142 | m_LocalCache.Add(scene.RegionInfo.RegionID, new RegionCache(scene)); |
150 | else | ||
151 | m_LocalCache.Add(scene.RegionInfo.RegionID, new RegionCache(scene)); | ||
152 | } | ||
153 | } | 143 | } |
154 | 144 | ||
155 | public void RemoveRegion(Scene scene) | 145 | public void RemoveRegion(Scene scene) |
156 | { | 146 | { |
157 | if (m_MainInstance == this) | 147 | m_LocalCache[scene.RegionInfo.RegionID].Clear(); |
158 | { | 148 | m_LocalCache.Remove(scene.RegionInfo.RegionID); |
159 | m_LocalCache[scene.RegionInfo.RegionID].Clear(); | ||
160 | m_LocalCache.Remove(scene.RegionInfo.RegionID); | ||
161 | } | ||
162 | } | 149 | } |
163 | 150 | ||
164 | public void RegionLoaded(Scene scene) | 151 | public void RegionLoaded(Scene scene) |
@@ -259,6 +246,5 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
259 | 246 | ||
260 | MainConsole.Instance.Output(caps.ToString()); | 247 | MainConsole.Instance.Output(caps.ToString()); |
261 | } | 248 | } |
262 | |||
263 | } | 249 | } |
264 | } | 250 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index 2399134..553a32d 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs | |||
@@ -47,21 +47,21 @@ namespace OpenSim.Region.CoreModules.World | |||
47 | 47 | ||
48 | public void Initialise(IConfigSource config) | 48 | public void Initialise(IConfigSource config) |
49 | { | 49 | { |
50 | MainConsole.Instance.Commands.AddCommand("access", true, | 50 | MainConsole.Instance.Commands.AddCommand("Users", true, |
51 | "login enable", | 51 | "login enable", |
52 | "login enable", | 52 | "login enable", |
53 | "Enable simulator logins", | 53 | "Enable simulator logins", |
54 | String.Empty, | 54 | String.Empty, |
55 | HandleLoginCommand); | 55 | HandleLoginCommand); |
56 | 56 | ||
57 | MainConsole.Instance.Commands.AddCommand("access", true, | 57 | MainConsole.Instance.Commands.AddCommand("Users", true, |
58 | "login disable", | 58 | "login disable", |
59 | "login disable", | 59 | "login disable", |
60 | "Disable simulator logins", | 60 | "Disable simulator logins", |
61 | String.Empty, | 61 | String.Empty, |
62 | HandleLoginCommand); | 62 | HandleLoginCommand); |
63 | 63 | ||
64 | MainConsole.Instance.Commands.AddCommand("access", true, | 64 | MainConsole.Instance.Commands.AddCommand("Users", true, |
65 | "login status", | 65 | "login status", |
66 | "login status", | 66 | "login status", |
67 | "Show login status", | 67 | "Show login status", |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs index f6d1a82..d2bbea3 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs | |||
@@ -62,58 +62,25 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
62 | { | 62 | { |
63 | m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); | 63 | m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); |
64 | 64 | ||
65 | m_module.Scene.AddCommand(m_module, "set terrain texture", | 65 | m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", |
66 | "set terrain texture <number> <uuid> [<x>] [<y>]", | 66 | "set terrain texture <number> <uuid> [<x>] [<y>]", |
67 | "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + | 67 | "Sets the terrain <number> to <uuid>, if <x> or <y> are specified, it will only " + |
68 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | 68 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + |
69 | " that coordinate.", | 69 | " that coordinate.", |
70 | consoleSetTerrainTexture); | 70 | consoleSetTerrainTexture); |
71 | 71 | ||
72 | m_module.Scene.AddCommand(m_module, "set terrain heights", | 72 | m_module.Scene.AddCommand("Regions", m_module, "set terrain heights", |
73 | "set terrain heights <corner> <min> <max> [<x>] [<y>]", | 73 | "set terrain heights <corner> <min> <max> [<x>] [<y>]", |
74 | "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " + | 74 | "Sets the terrain texture heights on corner #<corner> to <min>/<max>, if <x> or <y> are specified, it will only " + |
75 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + | 75 | "set it on regions with a matching coordinate. Specify -1 in <x> or <y> to wildcard" + |
76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", | 76 | " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3.", |
77 | consoleSetTerrainHeights); | 77 | consoleSetTerrainHeights); |
78 | |||
79 | Command showCommand | ||
80 | = new Command("show", CommandIntentions.COMMAND_STATISTICAL, ShowEstatesCommand, "Shows all estates on the simulator."); | ||
81 | |||
82 | m_commander.RegisterCommand("show", showCommand); | ||
83 | 78 | ||
84 | m_module.Scene.RegisterModuleCommander(m_commander); | 79 | m_module.Scene.AddCommand( |
85 | 80 | "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); | |
86 | m_module.Scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole; | ||
87 | } | 81 | } |
88 | 82 | ||
89 | public void Close() | 83 | public void Close() {} |
90 | { | ||
91 | m_module.Scene.EventManager.OnPluginConsole -= EventManagerOnPluginConsole; | ||
92 | m_module.Scene.UnregisterModuleCommander(m_commander.Name); | ||
93 | } | ||
94 | |||
95 | /// <summary> | ||
96 | /// Processes commandline input. Do not call directly. | ||
97 | /// </summary> | ||
98 | /// <param name="args">Commandline arguments</param> | ||
99 | protected void EventManagerOnPluginConsole(string[] args) | ||
100 | { | ||
101 | if (args[0] == "estate") | ||
102 | { | ||
103 | if (args.Length == 1) | ||
104 | { | ||
105 | m_commander.ProcessConsoleCommand("help", new string[0]); | ||
106 | return; | ||
107 | } | ||
108 | |||
109 | string[] tmpArgs = new string[args.Length - 2]; | ||
110 | int i; | ||
111 | for (i = 2; i < args.Length; i++) | ||
112 | tmpArgs[i - 2] = args[i]; | ||
113 | |||
114 | m_commander.ProcessConsoleCommand(args[1], tmpArgs); | ||
115 | } | ||
116 | } | ||
117 | 84 | ||
118 | protected void consoleSetTerrainTexture(string module, string[] args) | 85 | protected void consoleSetTerrainTexture(string module, string[] args) |
119 | { | 86 | { |
@@ -201,7 +168,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
201 | } | 168 | } |
202 | } | 169 | } |
203 | 170 | ||
204 | protected void ShowEstatesCommand(Object[] args) | 171 | protected void ShowEstatesCommand(string module, string[] cmd) |
205 | { | 172 | { |
206 | StringBuilder report = new StringBuilder(); | 173 | StringBuilder report = new StringBuilder(); |
207 | RegionInfo ri = m_module.Scene.RegionInfo; | 174 | RegionInfo ri = m_module.Scene.RegionInfo; |
diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index e3d04cd..f5a5c92 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | |||
@@ -78,45 +78,45 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
78 | m_scene = scene; | 78 | m_scene = scene; |
79 | m_console = MainConsole.Instance; | 79 | m_console = MainConsole.Instance; |
80 | 80 | ||
81 | m_console.Commands.AddCommand("region", false, "delete object owner", | 81 | m_console.Commands.AddCommand("Regions", false, "delete object owner", |
82 | "delete object owner <UUID>", | 82 | "delete object owner <UUID>", |
83 | "Delete a scene object by owner", HandleDeleteObject); | 83 | "Delete a scene object by owner", HandleDeleteObject); |
84 | m_console.Commands.AddCommand("region", false, "delete object creator", | 84 | m_console.Commands.AddCommand("Regions", false, "delete object creator", |
85 | "delete object creator <UUID>", | 85 | "delete object creator <UUID>", |
86 | "Delete a scene object by creator", HandleDeleteObject); | 86 | "Delete a scene object by creator", HandleDeleteObject); |
87 | m_console.Commands.AddCommand("region", false, "delete object uuid", | 87 | m_console.Commands.AddCommand("Regions", false, "delete object uuid", |
88 | "delete object uuid <UUID>", | 88 | "delete object uuid <UUID>", |
89 | "Delete a scene object by uuid", HandleDeleteObject); | 89 | "Delete a scene object by uuid", HandleDeleteObject); |
90 | m_console.Commands.AddCommand("region", false, "delete object name", | 90 | m_console.Commands.AddCommand("Regions", false, "delete object name", |
91 | "delete object name <name>", | 91 | "delete object name <name>", |
92 | "Delete a scene object by name", HandleDeleteObject); | 92 | "Delete a scene object by name", HandleDeleteObject); |
93 | m_console.Commands.AddCommand("region", false, "delete object outside", | 93 | m_console.Commands.AddCommand("Regions", false, "delete object outside", |
94 | "delete object outside", | 94 | "delete object outside", |
95 | "Delete all scene objects outside region boundaries", HandleDeleteObject); | 95 | "Delete all scene objects outside region boundaries", HandleDeleteObject); |
96 | 96 | ||
97 | m_console.Commands.AddCommand( | 97 | m_console.Commands.AddCommand( |
98 | "region", | 98 | "Regions", |
99 | false, | 99 | false, |
100 | "show object uuid", | 100 | "show object uuid", |
101 | "show object uuid <UUID>", | 101 | "show object uuid <UUID>", |
102 | "Show details of a scene object with the given UUID", HandleShowObjectByUuid); | 102 | "Show details of a scene object with the given UUID", HandleShowObjectByUuid); |
103 | 103 | ||
104 | m_console.Commands.AddCommand( | 104 | m_console.Commands.AddCommand( |
105 | "region", | 105 | "Regions", |
106 | false, | 106 | false, |
107 | "show object name", | 107 | "show object name", |
108 | "show object name <name>", | 108 | "show object name <name>", |
109 | "Show details of scene objects with the given name", HandleShowObjectByName); | 109 | "Show details of scene objects with the given name", HandleShowObjectByName); |
110 | 110 | ||
111 | m_console.Commands.AddCommand( | 111 | m_console.Commands.AddCommand( |
112 | "region", | 112 | "Regions", |
113 | false, | 113 | false, |
114 | "show part uuid", | 114 | "show part uuid", |
115 | "show part uuid <UUID>", | 115 | "show part uuid <UUID>", |
116 | "Show details of a scene object parts with the given UUID", HandleShowPartByUuid); | 116 | "Show details of a scene object parts with the given UUID", HandleShowPartByUuid); |
117 | 117 | ||
118 | m_console.Commands.AddCommand( | 118 | m_console.Commands.AddCommand( |
119 | "region", | 119 | "Regions", |
120 | false, | 120 | false, |
121 | "show part name", | 121 | "show part name", |
122 | "show part name <name>", | 122 | "show part name <name>", |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index df9bad1..e4ecc64 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -206,17 +206,17 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
206 | m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; | 206 | m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia; |
207 | m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; | 207 | m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia; |
208 | 208 | ||
209 | m_scene.AddCommand(this, "bypass permissions", | 209 | m_scene.AddCommand("Users", this, "bypass permissions", |
210 | "bypass permissions <true / false>", | 210 | "bypass permissions <true / false>", |
211 | "Bypass permission checks", | 211 | "Bypass permission checks", |
212 | HandleBypassPermissions); | 212 | HandleBypassPermissions); |
213 | 213 | ||
214 | m_scene.AddCommand(this, "force permissions", | 214 | m_scene.AddCommand("Users", this, "force permissions", |
215 | "force permissions <true / false>", | 215 | "force permissions <true / false>", |
216 | "Force permissions on or off", | 216 | "Force permissions on or off", |
217 | HandleForcePermissions); | 217 | HandleForcePermissions); |
218 | 218 | ||
219 | m_scene.AddCommand(this, "debug permissions", | 219 | m_scene.AddCommand("Users", this, "debug permissions", |
220 | "debug permissions <true / false>", | 220 | "debug permissions <true / false>", |
221 | "Turn on permissions debugging", | 221 | "Turn on permissions debugging", |
222 | HandleDebugPermissions); | 222 | HandleDebugPermissions); |
diff --git a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs index 86821c6..65180b5a 100644 --- a/OpenSim/Region/CoreModules/World/Region/RestartModule.cs +++ b/OpenSim/Region/CoreModules/World/Region/RestartModule.cs | |||
@@ -78,21 +78,21 @@ namespace OpenSim.Region.CoreModules.World.Region | |||
78 | m_Scene = scene; | 78 | m_Scene = scene; |
79 | 79 | ||
80 | scene.RegisterModuleInterface<IRestartModule>(this); | 80 | scene.RegisterModuleInterface<IRestartModule>(this); |
81 | MainConsole.Instance.Commands.AddCommand("RestartModule", | 81 | MainConsole.Instance.Commands.AddCommand("Regions", |
82 | false, "region restart bluebox", | 82 | false, "region restart bluebox", |
83 | "region restart bluebox <message> <delta seconds>+", | 83 | "region restart bluebox <message> <delta seconds>+", |
84 | "Schedule a region restart", | 84 | "Schedule a region restart", |
85 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", | 85 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a dismissable bluebox notice. If multiple deltas are given then a notice is sent when we reach each delta.", |
86 | HandleRegionRestart); | 86 | HandleRegionRestart); |
87 | 87 | ||
88 | MainConsole.Instance.Commands.AddCommand("RestartModule", | 88 | MainConsole.Instance.Commands.AddCommand("Regions", |
89 | false, "region restart notice", | 89 | false, "region restart notice", |
90 | "region restart notice <message> <delta seconds>+", | 90 | "region restart notice <message> <delta seconds>+", |
91 | "Schedule a region restart", | 91 | "Schedule a region restart", |
92 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", | 92 | "Schedule a region restart after a given number of seconds. If one delta is given then the region is restarted in delta seconds time. A time to restart is sent to users in the region as a transient notice. If multiple deltas are given then a notice is sent when we reach each delta.", |
93 | HandleRegionRestart); | 93 | HandleRegionRestart); |
94 | 94 | ||
95 | MainConsole.Instance.Commands.AddCommand("RestartModule", | 95 | MainConsole.Instance.Commands.AddCommand("Regions", |
96 | false, "region restart abort", | 96 | false, "region restart abort", |
97 | "region restart abort [<message>]", | 97 | "region restart abort [<message>]", |
98 | "Abort a region restart", HandleRegionRestart); | 98 | "Abort a region restart", HandleRegionRestart); |
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index a838e1e..9a954b8 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs | |||
@@ -277,18 +277,19 @@ namespace OpenSim.Region.CoreModules | |||
277 | m_frame = 0; | 277 | m_frame = 0; |
278 | 278 | ||
279 | // This one puts an entry in the main help screen | 279 | // This one puts an entry in the main help screen |
280 | m_scene.AddCommand(this, String.Empty, "sun", "Usage: sun [param] [value] - Get or Update Sun module paramater", null); | 280 | // m_scene.AddCommand("Regions", this, "sun", "sun", "Usage: sun [param] [value] - Get or Update Sun module paramater", null); |
281 | 281 | ||
282 | // This one enables the ability to type just "sun" without any parameters | 282 | // This one enables the ability to type just "sun" without any parameters |
283 | m_scene.AddCommand(this, "sun", "", "", HandleSunConsoleCommand); | 283 | // m_scene.AddCommand("Regions", this, "sun", "", "", HandleSunConsoleCommand); |
284 | foreach (KeyValuePair<string, string> kvp in GetParamList()) | 284 | foreach (KeyValuePair<string, string> kvp in GetParamList()) |
285 | { | 285 | { |
286 | m_scene.AddCommand(this, String.Format("sun {0}", kvp.Key), String.Format("{0} - {1}", kvp.Key, kvp.Value), "", HandleSunConsoleCommand); | 286 | string sunCommand = string.Format("sun {0}", kvp.Key); |
287 | m_scene.AddCommand("Regions", this, sunCommand, string.Format("{0} [<value>]", sunCommand), kvp.Value, "", HandleSunConsoleCommand); | ||
287 | } | 288 | } |
288 | 289 | ||
289 | TimeZone local = TimeZone.CurrentTimeZone; | 290 | TimeZone local = TimeZone.CurrentTimeZone; |
290 | TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; | 291 | TicksUTCOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; |
291 | m_log.Debug("[SUN]: localtime offset is " + TicksUTCOffset); | 292 | m_log.DebugFormat("[SUN]: localtime offset is {0}", TicksUTCOffset); |
292 | 293 | ||
293 | // Align ticks with Second Life | 294 | // Align ticks with Second Life |
294 | 295 | ||
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index a488725..7b6fbda 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -117,24 +117,31 @@ namespace OpenSim.Region.CoreModules | |||
117 | } | 117 | } |
118 | 118 | ||
119 | // This one puts an entry in the main help screen | 119 | // This one puts an entry in the main help screen |
120 | m_scene.AddCommand(this, String.Empty, "wind", "Usage: wind <plugin> <param> [value] - Get or Update Wind paramaters", null); | 120 | // m_scene.AddCommand("Regions", this, "wind", "wind", "Usage: wind <plugin> <param> [value] - Get or Update Wind paramaters", null); |
121 | 121 | ||
122 | // This one enables the ability to type just the base command without any parameters | 122 | // This one enables the ability to type just the base command without any parameters |
123 | m_scene.AddCommand(this, "wind", "", "", HandleConsoleCommand); | 123 | // m_scene.AddCommand("Regions", this, "wind", "", "", HandleConsoleCommand); |
124 | 124 | ||
125 | // Get a list of the parameters for each plugin | 125 | // Get a list of the parameters for each plugin |
126 | foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) | 126 | foreach (IWindModelPlugin windPlugin in m_availableWindPlugins.Values) |
127 | { | 127 | { |
128 | m_scene.AddCommand(this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); | 128 | // m_scene.AddCommand("Regions", this, String.Format("wind base wind_plugin {0}", windPlugin.Name), String.Format("{0} - {1}", windPlugin.Name, windPlugin.Description), "", HandleConsoleBaseCommand); |
129 | m_scene.AddCommand(this, String.Format("wind base wind_update_rate"), "Change the wind update rate.", "", HandleConsoleBaseCommand); | 129 | m_scene.AddCommand( |
130 | "Regions", | ||
131 | this, | ||
132 | "wind base wind_update_rate", | ||
133 | "wind base wind_update_rate [<value>]", | ||
134 | "Get or set the wind update rate.", | ||
135 | "", | ||
136 | HandleConsoleBaseCommand); | ||
130 | 137 | ||
131 | foreach (KeyValuePair<string, string> kvp in windPlugin.WindParams()) | 138 | foreach (KeyValuePair<string, string> kvp in windPlugin.WindParams()) |
132 | { | 139 | { |
133 | m_scene.AddCommand(this, String.Format("wind {0} {1}", windPlugin.Name, kvp.Key), String.Format("{0} : {1} - {2}", windPlugin.Name, kvp.Key, kvp.Value), "", HandleConsoleParamCommand); | 140 | string windCommand = String.Format("wind {0} {1}", windPlugin.Name, kvp.Key); |
141 | m_scene.AddCommand("Regions", this, windCommand, string.Format("{0} [<value>]", windCommand), kvp.Value, "", HandleConsoleParamCommand); | ||
134 | } | 142 | } |
135 | } | 143 | } |
136 | 144 | ||
137 | |||
138 | // Register event handlers for when Avatars enter the region, and frame ticks | 145 | // Register event handlers for when Avatars enter the region, and frame ticks |
139 | m_scene.EventManager.OnFrame += WindUpdate; | 146 | m_scene.EventManager.OnFrame += WindUpdate; |
140 | m_scene.EventManager.OnMakeRootAgent += OnAgentEnteredRegion; | 147 | m_scene.EventManager.OnMakeRootAgent += OnAgentEnteredRegion; |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 4ebfb21..899e5ea 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
102 | m_scene.RegisterModuleInterface<IWorldMapModule>(this); | 102 | m_scene.RegisterModuleInterface<IWorldMapModule>(this); |
103 | 103 | ||
104 | m_scene.AddCommand( | 104 | m_scene.AddCommand( |
105 | this, "export-map", | 105 | "Regions", this, "export-map", |
106 | "export-map [<path>]", | 106 | "export-map [<path>]", |
107 | "Save an image of the world map", HandleExportWorldMapConsoleCommand); | 107 | "Save an image of the world map", HandleExportWorldMapConsoleCommand); |
108 | 108 | ||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
132 | { | 132 | { |
133 | } | 133 | } |
134 | 134 | ||
135 | public Type ReplaceableInterface | 135 | public Type ReplaceableInterface |
136 | { | 136 | { |
137 | get { return null; } | 137 | get { return null; } |
138 | } | 138 | } |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
220 | // There is a major hack going on in this method. The viewer doesn't request | 220 | // There is a major hack going on in this method. The viewer doesn't request |
221 | // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack, | 221 | // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack, |
222 | // grids above that cell don't have a map at all. So, here's the hack: we wait | 222 | // grids above that cell don't have a map at all. So, here's the hack: we wait |
223 | // for this CAP request to come, and we inject the map blocks at this point. | 223 | // for this CAP request to come, and we inject the map blocks at this point. |
224 | // In a normal scenario, this request simply sends back the MapLayer (the blue color). | 224 | // In a normal scenario, this request simply sends back the MapLayer (the blue color). |
225 | // In the hacked scenario, it also sends the map blocks via UDP. | 225 | // In the hacked scenario, it also sends the map blocks via UDP. |
226 | // | 226 | // |
@@ -351,6 +351,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
351 | process, | 351 | process, |
352 | string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName), | 352 | string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName), |
353 | ThreadPriority.BelowNormal, | 353 | ThreadPriority.BelowNormal, |
354 | true, | ||
354 | true); | 355 | true); |
355 | } | 356 | } |
356 | 357 | ||
@@ -750,7 +751,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
750 | { | 751 | { |
751 | uint x = 0, y = 0; | 752 | uint x = 0, y = 0; |
752 | Utils.LongToUInts(regionhandle, out x, out y); | 753 | Utils.LongToUInts(regionhandle, out x, out y); |
753 | GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y); | 754 | GridRegion mreg = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, (int)x, (int)y); |
754 | 755 | ||
755 | if (mreg != null) | 756 | if (mreg != null) |
756 | { | 757 | { |
@@ -856,7 +857,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
856 | finally | 857 | finally |
857 | { | 858 | { |
858 | if (os != null) | 859 | if (os != null) |
859 | os.Close(); | 860 | os.Close(); |
860 | } | 861 | } |
861 | 862 | ||
862 | string response_mapItems_reply = null; | 863 | string response_mapItems_reply = null; |
@@ -959,16 +960,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
959 | // on an unloaded square. | 960 | // on an unloaded square. |
960 | // But make sure: Look whether the one we requested is in there | 961 | // But make sure: Look whether the one we requested is in there |
961 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, | 962 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, |
962 | minX * (int)Constants.RegionSize, | 963 | minX * (int)Constants.RegionSize, |
963 | maxX * (int)Constants.RegionSize, | 964 | maxX * (int)Constants.RegionSize, |
964 | minY * (int)Constants.RegionSize, | 965 | minY * (int)Constants.RegionSize, |
965 | maxY * (int)Constants.RegionSize); | 966 | maxY * (int)Constants.RegionSize); |
966 | 967 | ||
967 | if (regions != null) | 968 | if (regions != null) |
968 | { | 969 | { |
969 | foreach (GridRegion r in regions) | 970 | foreach (GridRegion r in regions) |
970 | { | 971 | { |
971 | if ((r.RegionLocX == minX * (int)Constants.RegionSize) && | 972 | if ((r.RegionLocX == minX * (int)Constants.RegionSize) && |
972 | (r.RegionLocY == minY * (int)Constants.RegionSize)) | 973 | (r.RegionLocY == minY * (int)Constants.RegionSize)) |
973 | { | 974 | { |
974 | // found it => add it to response | 975 | // found it => add it to response |
@@ -1003,7 +1004,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1003 | { | 1004 | { |
1004 | List<MapBlockData> mapBlocks = new List<MapBlockData>(); | 1005 | List<MapBlockData> mapBlocks = new List<MapBlockData>(); |
1005 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, | 1006 | List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, |
1006 | (minX - 4) * (int)Constants.RegionSize, | 1007 | (minX - 4) * (int)Constants.RegionSize, |
1007 | (maxX + 4) * (int)Constants.RegionSize, | 1008 | (maxX + 4) * (int)Constants.RegionSize, |
1008 | (minY - 4) * (int)Constants.RegionSize, | 1009 | (minY - 4) * (int)Constants.RegionSize, |
1009 | (maxY + 4) * (int)Constants.RegionSize); | 1010 | (maxY + 4) * (int)Constants.RegionSize); |
@@ -1335,7 +1336,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1335 | // Cannot create a map for a nonexistant heightmap | 1336 | // Cannot create a map for a nonexistant heightmap |
1336 | if (m_scene.Heightmap == null) | 1337 | if (m_scene.Heightmap == null) |
1337 | return; | 1338 | return; |
1338 | 1339 | ||
1339 | //create a texture asset of the terrain | 1340 | //create a texture asset of the terrain |
1340 | IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>(); | 1341 | IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>(); |
1341 | if (terrain == null) | 1342 | if (terrain == null) |
@@ -1344,7 +1345,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1344 | byte[] data = terrain.WriteJpeg2000Image(); | 1345 | byte[] data = terrain.WriteJpeg2000Image(); |
1345 | if (data == null) | 1346 | if (data == null) |
1346 | return; | 1347 | return; |
1347 | 1348 | ||
1348 | byte[] overlay = GenerateOverlay(); | 1349 | byte[] overlay = GenerateOverlay(); |
1349 | 1350 | ||
1350 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); | 1351 | m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE"); |
@@ -1365,7 +1366,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1365 | // Store the new one | 1366 | // Store the new one |
1366 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); | 1367 | m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID); |
1367 | m_scene.AssetService.Store(asset); | 1368 | m_scene.AssetService.Store(asset); |
1368 | 1369 | ||
1369 | if (overlay != null) | 1370 | if (overlay != null) |
1370 | { | 1371 | { |
1371 | parcelImageID = UUID.Random(); | 1372 | parcelImageID = UUID.Random(); |
@@ -1389,7 +1390,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1389 | m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; | 1390 | m_scene.RegionInfo.RegionSettings.TerrainImageID = terrainImageID; |
1390 | m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID; | 1391 | m_scene.RegionInfo.RegionSettings.ParcelImageID = parcelImageID; |
1391 | m_scene.RegionInfo.RegionSettings.Save(); | 1392 | m_scene.RegionInfo.RegionSettings.Save(); |
1392 | 1393 | ||
1393 | // Delete the old one | 1394 | // Delete the old one |
1394 | // m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID); | 1395 | // m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastTerrainImageID); |
1395 | m_scene.AssetService.Delete(lastTerrainImageID.ToString()); | 1396 | m_scene.AssetService.Delete(lastTerrainImageID.ToString()); |
@@ -1510,11 +1511,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1510 | 1511 | ||
1511 | if (!landForSale) | 1512 | if (!landForSale) |
1512 | { | 1513 | { |
1513 | m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not geenrating overlay", m_scene.RegionInfo.RegionName); | 1514 | m_log.DebugFormat("[WORLD MAP]: Region {0} has no parcels for sale, not generating overlay", m_scene.RegionInfo.RegionName); |
1514 | return null; | 1515 | return null; |
1515 | } | 1516 | } |
1516 | 1517 | ||
1517 | m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, genrating overlay", m_scene.RegionInfo.RegionName); | 1518 | m_log.DebugFormat("[WORLD MAP]: Region {0} has parcels for sale, generating overlay", m_scene.RegionInfo.RegionName); |
1518 | 1519 | ||
1519 | try | 1520 | try |
1520 | { | 1521 | { |