diff options
author | Melanie Thielker | 2009-02-10 23:15:48 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-02-10 23:15:48 +0000 |
commit | 9bfbfa381abc92f3c5fc8e97405943128c85c5d4 (patch) | |
tree | 06248d4262cfd0e053010d6b8b6a19b8f6db2d40 /OpenSim/Region/Application | |
parent | Fixes the problem of attachment offset after crossings/TPs. Hopefully it fixe... (diff) | |
download | opensim-SC-9bfbfa381abc92f3c5fc8e97405943128c85c5d4.zip opensim-SC-9bfbfa381abc92f3c5fc8e97405943128c85c5d4.tar.gz opensim-SC-9bfbfa381abc92f3c5fc8e97405943128c85c5d4.tar.bz2 opensim-SC-9bfbfa381abc92f3c5fc8e97405943128c85c5d4.tar.xz |
Add proper handling for shared vs. unshared modules to the command
interface. Shared modules will now only get added once, so the command
handler is called once per module, not once per scene. Removal of scenes
has no adverse effects. Nonshared modules will be called for each scene.
Diffstat (limited to 'OpenSim/Region/Application')
-rw-r--r-- | OpenSim/Region/Application/HGOpenSimNode.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 88 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 7 |
3 files changed, 50 insertions, 49 deletions
diff --git a/OpenSim/Region/Application/HGOpenSimNode.cs b/OpenSim/Region/Application/HGOpenSimNode.cs index 458c6af..6f6d6cb 100644 --- a/OpenSim/Region/Application/HGOpenSimNode.cs +++ b/OpenSim/Region/Application/HGOpenSimNode.cs | |||
@@ -78,8 +78,8 @@ namespace OpenSim | |||
78 | 78 | ||
79 | base.StartupSpecific(); | 79 | base.StartupSpecific(); |
80 | 80 | ||
81 | MainConsole.Instance.Commands.AddCommand("hypergrid", "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand); | 81 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-mapping", "link-mapping [<x> <y>] <cr>", "Set local coordinate to map HG regions to", RunCommand); |
82 | MainConsole.Instance.Commands.AddCommand("hypergrid", "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand); | 82 | MainConsole.Instance.Commands.AddCommand("hypergrid", false, "link-region", "link-region <Xloc> <Yloc> <HostName>:<HttpPort>[:<RemoteRegionName>] <cr>", "Link a hypergrid region", RunCommand); |
83 | } | 83 | } |
84 | 84 | ||
85 | protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) | 85 | protected override void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 7b47eb4..898e298 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -99,185 +99,185 @@ namespace OpenSim | |||
99 | m_console.SetGuiMode(m_gui); | 99 | m_console.SetGuiMode(m_gui); |
100 | MainConsole.Instance = m_console; | 100 | MainConsole.Instance = m_console; |
101 | 101 | ||
102 | m_console.Commands.AddCommand("region", "clear assets", | 102 | m_console.Commands.AddCommand("region", false, "clear assets", |
103 | "clear assets", | 103 | "clear assets", |
104 | "Clear the asset cache", HandleClearAssets); | 104 | "Clear the asset cache", HandleClearAssets); |
105 | 105 | ||
106 | m_console.Commands.AddCommand("region", "force update", | 106 | m_console.Commands.AddCommand("region", false, "force update", |
107 | "force update", | 107 | "force update", |
108 | "Force the update of all objects on clients", | 108 | "Force the update of all objects on clients", |
109 | HandleForceUpdate); | 109 | HandleForceUpdate); |
110 | 110 | ||
111 | m_console.Commands.AddCommand("region", "debug packet", | 111 | m_console.Commands.AddCommand("region", false, "debug packet", |
112 | "debug packet <level>", | 112 | "debug packet <level>", |
113 | "Turn on packet debugging", Debug); | 113 | "Turn on packet debugging", Debug); |
114 | 114 | ||
115 | m_console.Commands.AddCommand("region", "debug scene", | 115 | m_console.Commands.AddCommand("region", false, "debug scene", |
116 | "debug scene <cripting> <collisions> <physics>", | 116 | "debug scene <cripting> <collisions> <physics>", |
117 | "Turn on scene debugging", Debug); | 117 | "Turn on scene debugging", Debug); |
118 | 118 | ||
119 | m_console.Commands.AddCommand("region", "change region", | 119 | m_console.Commands.AddCommand("region", false, "change region", |
120 | "change region <region name>", | 120 | "change region <region name>", |
121 | "Change current console region", ChangeSelectedRegion); | 121 | "Change current console region", ChangeSelectedRegion); |
122 | 122 | ||
123 | m_console.Commands.AddCommand("region", "save xml", | 123 | m_console.Commands.AddCommand("region", false, "save xml", |
124 | "save xml", | 124 | "save xml", |
125 | "Save a region's data in XML format", SaveXml); | 125 | "Save a region's data in XML format", SaveXml); |
126 | 126 | ||
127 | m_console.Commands.AddCommand("region", "save xml2", | 127 | m_console.Commands.AddCommand("region", false, "save xml2", |
128 | "save xml2", | 128 | "save xml2", |
129 | "Save a region's data in XML2 format", SaveXml2); | 129 | "Save a region's data in XML2 format", SaveXml2); |
130 | 130 | ||
131 | m_console.Commands.AddCommand("region", "load xml", | 131 | m_console.Commands.AddCommand("region", false, "load xml", |
132 | "load xml [-newIDs [<x> <y> <z>]]", | 132 | "load xml [-newIDs [<x> <y> <z>]]", |
133 | "Load a region's data from XML format", LoadXml); | 133 | "Load a region's data from XML format", LoadXml); |
134 | 134 | ||
135 | m_console.Commands.AddCommand("region", "load xml2", | 135 | m_console.Commands.AddCommand("region", false, "load xml2", |
136 | "load xml2", | 136 | "load xml2", |
137 | "Load a region's data from XML2 format", LoadXml2); | 137 | "Load a region's data from XML2 format", LoadXml2); |
138 | 138 | ||
139 | m_console.Commands.AddCommand("region", "save prims xml2", | 139 | m_console.Commands.AddCommand("region", false, "save prims xml2", |
140 | "save prims xml2 [<prim name> <file name>]", | 140 | "save prims xml2 [<prim name> <file name>]", |
141 | "Save named prim to XML2", SavePrimsXml2); | 141 | "Save named prim to XML2", SavePrimsXml2); |
142 | 142 | ||
143 | m_console.Commands.AddCommand("region", "load oar", | 143 | m_console.Commands.AddCommand("region", false, "load oar", |
144 | "load oar <oar name>", | 144 | "load oar <oar name>", |
145 | "Load a region's data from OAR archive", LoadOar); | 145 | "Load a region's data from OAR archive", LoadOar); |
146 | 146 | ||
147 | m_console.Commands.AddCommand("region", "save oar", | 147 | m_console.Commands.AddCommand("region", false, "save oar", |
148 | "save oar <oar name>", | 148 | "save oar <oar name>", |
149 | "Save a region's data to an OAR archive", | 149 | "Save a region's data to an OAR archive", |
150 | "More information on forthcoming options here soon", SaveOar); | 150 | "More information on forthcoming options here soon", SaveOar); |
151 | 151 | ||
152 | /* | 152 | /* |
153 | m_console.Commands.AddCommand("region", "save inventory", | 153 | m_console.Commands.AddCommand("region", false, "save inventory", |
154 | "save inventory <first> <last> <path> <file>", | 154 | "save inventory <first> <last> <path> <file>", |
155 | "Save user inventory data", SaveInv); | 155 | "Save user inventory data", SaveInv); |
156 | 156 | ||
157 | m_console.Commands.AddCommand("region", "load inventory", | 157 | m_console.Commands.AddCommand("region", false, "load inventory", |
158 | "load inventory <first> <last> <path> <file>", | 158 | "load inventory <first> <last> <path> <file>", |
159 | "Load user inventory data", LoadInv); | 159 | "Load user inventory data", LoadInv); |
160 | */ | 160 | */ |
161 | 161 | ||
162 | m_console.Commands.AddCommand("region", "edit scale", | 162 | m_console.Commands.AddCommand("region", false, "edit scale", |
163 | "edit scale <name> <x> <y> <z>", | 163 | "edit scale <name> <x> <y> <z>", |
164 | "Change the scale of a named prim", HandleEditScale); | 164 | "Change the scale of a named prim", HandleEditScale); |
165 | 165 | ||
166 | m_console.Commands.AddCommand("region", "kick user", | 166 | m_console.Commands.AddCommand("region", false, "kick user", |
167 | "kick user <first> <last>", | 167 | "kick user <first> <last>", |
168 | "Kick a user off the simulator", KickUserCommand); | 168 | "Kick a user off the simulator", KickUserCommand); |
169 | 169 | ||
170 | m_console.Commands.AddCommand("region", "show assets", | 170 | m_console.Commands.AddCommand("region", false, "show assets", |
171 | "show assets", | 171 | "show assets", |
172 | "Show asset data", HandleShow); | 172 | "Show asset data", HandleShow); |
173 | 173 | ||
174 | m_console.Commands.AddCommand("region", "show users", | 174 | m_console.Commands.AddCommand("region", false, "show users", |
175 | "show users [full]", | 175 | "show users [full]", |
176 | "Show user data", HandleShow); | 176 | "Show user data", HandleShow); |
177 | 177 | ||
178 | m_console.Commands.AddCommand("region", "show users full", | 178 | m_console.Commands.AddCommand("region", false, "show users full", |
179 | "show users full", | 179 | "show users full", |
180 | String.Empty, HandleShow); | 180 | String.Empty, HandleShow); |
181 | 181 | ||
182 | m_console.Commands.AddCommand("region", "show modules", | 182 | m_console.Commands.AddCommand("region", false, "show modules", |
183 | "show modules", | 183 | "show modules", |
184 | "Show module data", HandleShow); | 184 | "Show module data", HandleShow); |
185 | 185 | ||
186 | m_console.Commands.AddCommand("region", "show regions", | 186 | m_console.Commands.AddCommand("region", false, "show regions", |
187 | "show regions", | 187 | "show regions", |
188 | "Show region data", HandleShow); | 188 | "Show region data", HandleShow); |
189 | 189 | ||
190 | m_console.Commands.AddCommand("region", "show queues", | 190 | m_console.Commands.AddCommand("region", false, "show queues", |
191 | "show queues", | 191 | "show queues", |
192 | "Show queue data", HandleShow); | 192 | "Show queue data", HandleShow); |
193 | 193 | ||
194 | m_console.Commands.AddCommand("region", "alert", | 194 | m_console.Commands.AddCommand("region", false, "alert", |
195 | "alert <first> <last> <message>", | 195 | "alert <first> <last> <message>", |
196 | "Send an alert to a user", RunCommand); | 196 | "Send an alert to a user", RunCommand); |
197 | 197 | ||
198 | m_console.Commands.AddCommand("region", "alert general", | 198 | m_console.Commands.AddCommand("region", false, "alert general", |
199 | "alert general <message>", | 199 | "alert general <message>", |
200 | "Send an alert everyone", RunCommand); | 200 | "Send an alert everyone", RunCommand); |
201 | 201 | ||
202 | m_console.Commands.AddCommand("region", "backup", | 202 | m_console.Commands.AddCommand("region", false, "backup", |
203 | "backup", | 203 | "backup", |
204 | "Persist objects to the database now", RunCommand); | 204 | "Persist objects to the database now", RunCommand); |
205 | 205 | ||
206 | m_console.Commands.AddCommand("region", "create region", | 206 | m_console.Commands.AddCommand("region", false, "create region", |
207 | "create region", | 207 | "create region", |
208 | "Create a new region", HandleCreateRegion); | 208 | "Create a new region", HandleCreateRegion); |
209 | 209 | ||
210 | m_console.Commands.AddCommand("region", "login enable", | 210 | m_console.Commands.AddCommand("region", false, "login enable", |
211 | "login enable", | 211 | "login enable", |
212 | "Enable logins to the simulator", HandleLoginEnable); | 212 | "Enable logins to the simulator", HandleLoginEnable); |
213 | 213 | ||
214 | m_console.Commands.AddCommand("region", "login disable", | 214 | m_console.Commands.AddCommand("region", false, "login disable", |
215 | "login disable", | 215 | "login disable", |
216 | "Disable logins to the simulator", HandleLoginDisable); | 216 | "Disable logins to the simulator", HandleLoginDisable); |
217 | 217 | ||
218 | m_console.Commands.AddCommand("region", "login status", | 218 | m_console.Commands.AddCommand("region", false, "login status", |
219 | "login status", | 219 | "login status", |
220 | "Display status of logins", HandleLoginStatus); | 220 | "Display status of logins", HandleLoginStatus); |
221 | 221 | ||
222 | m_console.Commands.AddCommand("region", "restart", | 222 | m_console.Commands.AddCommand("region", false, "restart", |
223 | "restart", | 223 | "restart", |
224 | "Restart all sims in this instance", RunCommand); | 224 | "Restart all sims in this instance", RunCommand); |
225 | 225 | ||
226 | m_console.Commands.AddCommand("region", "config set", | 226 | m_console.Commands.AddCommand("region", false, "config set", |
227 | "config set <section> <field> <value>", | 227 | "config set <section> <field> <value>", |
228 | "Set a config option", HandleConfig); | 228 | "Set a config option", HandleConfig); |
229 | 229 | ||
230 | m_console.Commands.AddCommand("region", "config get", | 230 | m_console.Commands.AddCommand("region", false, "config get", |
231 | "config get <section> <field>", | 231 | "config get <section> <field>", |
232 | "Read a config option", HandleConfig); | 232 | "Read a config option", HandleConfig); |
233 | 233 | ||
234 | m_console.Commands.AddCommand("region", "config save", | 234 | m_console.Commands.AddCommand("region", false, "config save", |
235 | "config save", | 235 | "config save", |
236 | "Save current configuration", HandleConfig); | 236 | "Save current configuration", HandleConfig); |
237 | 237 | ||
238 | m_console.Commands.AddCommand("region", "command-script", | 238 | m_console.Commands.AddCommand("region", false, "command-script", |
239 | "command-script <script>", | 239 | "command-script <script>", |
240 | "Run a command script from file", RunCommand); | 240 | "Run a command script from file", RunCommand); |
241 | 241 | ||
242 | m_console.Commands.AddCommand("region", "export-map", | 242 | m_console.Commands.AddCommand("region", false, "export-map", |
243 | "export-map <file>", | 243 | "export-map <file>", |
244 | "Save an image of the world map", RunCommand); | 244 | "Save an image of the world map", RunCommand); |
245 | 245 | ||
246 | m_console.Commands.AddCommand("region", "remove-region", | 246 | m_console.Commands.AddCommand("region", false, "remove-region", |
247 | "remove-region <name>", | 247 | "remove-region <name>", |
248 | "Remove a region from this simulator", RunCommand); | 248 | "Remove a region from this simulator", RunCommand); |
249 | 249 | ||
250 | m_console.Commands.AddCommand("region", "delete-region", | 250 | m_console.Commands.AddCommand("region", false, "delete-region", |
251 | "delete-region <name>", | 251 | "delete-region <name>", |
252 | "Delete a region from disk", RunCommand); | 252 | "Delete a region from disk", RunCommand); |
253 | 253 | ||
254 | m_console.Commands.AddCommand("region", "predecode-j2k", | 254 | m_console.Commands.AddCommand("region", false, "predecode-j2k", |
255 | "predecode-j2k [<num threads>]>", | 255 | "predecode-j2k [<num threads>]>", |
256 | "Precache assets,decode j2k layerdata", RunCommand); | 256 | "Precache assets,decode j2k layerdata", RunCommand); |
257 | 257 | ||
258 | m_console.Commands.AddCommand("region", "modules list", | 258 | m_console.Commands.AddCommand("region", false, "modules list", |
259 | "modules list", | 259 | "modules list", |
260 | "List modules", HandleModules); | 260 | "List modules", HandleModules); |
261 | 261 | ||
262 | m_console.Commands.AddCommand("region", "modules load", | 262 | m_console.Commands.AddCommand("region", false, "modules load", |
263 | "modules load <name>", | 263 | "modules load <name>", |
264 | "Load a module", HandleModules); | 264 | "Load a module", HandleModules); |
265 | 265 | ||
266 | m_console.Commands.AddCommand("region", "modules unload", | 266 | m_console.Commands.AddCommand("region", false, "modules unload", |
267 | "modules unload <name>", | 267 | "modules unload <name>", |
268 | "Unload a module", HandleModules); | 268 | "Unload a module", HandleModules); |
269 | 269 | ||
270 | m_console.Commands.AddCommand("region", "Add-InventoryHost", | 270 | m_console.Commands.AddCommand("region", false, "Add-InventoryHost", |
271 | "Add-InventoryHost <host>", | 271 | "Add-InventoryHost <host>", |
272 | String.Empty, RunCommand); | 272 | String.Empty, RunCommand); |
273 | 273 | ||
274 | if (ConfigurationSettings.Standalone) | 274 | if (ConfigurationSettings.Standalone) |
275 | { | 275 | { |
276 | m_console.Commands.AddCommand("region", "create user", | 276 | m_console.Commands.AddCommand("region", false, "create user", |
277 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", | 277 | "create user [<first> [<last> [<pass> [<x> <y> [<email>]]]]]", |
278 | "Create a new user", HandleCreateUser); | 278 | "Create a new user", HandleCreateUser); |
279 | 279 | ||
280 | m_console.Commands.AddCommand("region", "reset user password", | 280 | m_console.Commands.AddCommand("region", false, "reset user password", |
281 | "reset user password [<first> [<last> [<password>]]]", | 281 | "reset user password [<first> [<last> [<password>]]]", |
282 | "Reset a user password", HandleResetUserPassword); | 282 | "Reset a user password", HandleResetUserPassword); |
283 | } | 283 | } |
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index aab80d9..d86a47b 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -203,12 +203,12 @@ namespace OpenSim | |||
203 | 203 | ||
204 | foreach (string topic in topics) | 204 | foreach (string topic in topics) |
205 | { | 205 | { |
206 | m_console.Commands.AddCommand("plugin", "help " + topic, | 206 | m_console.Commands.AddCommand("plugin", false, "help " + topic, |
207 | "help " + topic, | 207 | "help " + topic, |
208 | "Get help on plugin command '" + topic + "'", | 208 | "Get help on plugin command '" + topic + "'", |
209 | HandleCommanderHelp); | 209 | HandleCommanderHelp); |
210 | 210 | ||
211 | m_console.Commands.AddCommand("plugin", topic, | 211 | m_console.Commands.AddCommand("plugin", false, topic, |
212 | topic, | 212 | topic, |
213 | "Execute subcommand for plugin '" + topic + "'", | 213 | "Execute subcommand for plugin '" + topic + "'", |
214 | null); | 214 | null); |
@@ -221,7 +221,8 @@ namespace OpenSim | |||
221 | 221 | ||
222 | foreach (string command in commander.Commands.Keys) | 222 | foreach (string command in commander.Commands.Keys) |
223 | { | 223 | { |
224 | m_console.Commands.AddCommand(topic, topic + " " + command, | 224 | m_console.Commands.AddCommand(topic, false, |
225 | topic + " " + command, | ||
225 | topic + " " + commander.Commands[command].ShortHelp(), | 226 | topic + " " + commander.Commands[command].ShortHelp(), |
226 | String.Empty, HandleCommanderCommand); | 227 | String.Empty, HandleCommanderCommand); |
227 | } | 228 | } |