aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
index 438331a..f0f186a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServerCommands.cs
@@ -156,6 +156,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
156 m_console.Commands.AddCommand( 156 m_console.Commands.AddCommand(
157 "Debug", 157 "Debug",
158 false, 158 false,
159 "debug lludp set",
160 "debug lludp set <param> <value>",
161 "Set a parameter for the server.",
162 "Only current setting is 'scene-throttle-max' which sets the current max cumulative kbit/s provided for this scene to clients",
163 HandleSetCommand);
164
165 m_console.Commands.AddCommand(
166 "Debug",
167 false,
159 "debug lludp toggle agentupdate", 168 "debug lludp toggle agentupdate",
160 "debug lludp toggle agentupdate", 169 "debug lludp toggle agentupdate",
161 "Toggle whether agentupdate packets are processed or simply discarded.", 170 "Toggle whether agentupdate packets are processed or simply discarded.",
@@ -363,6 +372,33 @@ namespace OpenSim.Region.ClientStack.LindenUDP
363 }); 372 });
364 } 373 }
365 374
375 private void HandleSetCommand(string module, string[] args)
376 {
377 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)
378 return;
379
380 if (args.Length != 5)
381 {
382 MainConsole.Instance.OutputFormat("Usage: debug lludp set <param> <value>");
383 return;
384 }
385
386 string param = args[3];
387 string rawValue = args[4];
388
389 int newValue;
390
391 if (param == "scene-throttle-max")
392 {
393 if (!ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, rawValue, out newValue))
394 return;
395
396 m_udpServer.Throttle.RequestedDripRate = newValue * 8 * 1000;
397 }
398
399 m_console.OutputFormat("{0} set to {1} in {2}", param, rawValue, m_udpServer.Scene.Name);
400 }
401
366 private void HandlePacketCommand(string module, string[] args) 402 private void HandlePacketCommand(string module, string[] args)
367 { 403 {
368 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene) 404 if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_udpServer.Scene)