diff options
author | Adam Frisby | 2007-12-03 07:28:04 +0000 |
---|---|---|
committer | Adam Frisby | 2007-12-03 07:28:04 +0000 |
commit | 1d5e19e47659e889df4959528e504a598f32c41e (patch) | |
tree | 63430292d35c00bd7c9f423a9cfc8fc7c1d238a5 /OpenSim/ApplicationPlugins/RemoteController | |
parent | minor meaningless changes (diff) | |
download | opensim-SC_OLD-1d5e19e47659e889df4959528e504a598f32c41e.zip opensim-SC_OLD-1d5e19e47659e889df4959528e504a598f32c41e.tar.gz opensim-SC_OLD-1d5e19e47659e889df4959528e504a598f32c41e.tar.bz2 opensim-SC_OLD-1d5e19e47659e889df4959528e504a598f32c41e.tar.xz |
* Added a XMLRPC Restart command to RemoteAdminPlugin
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 8cd6fc6..18d5f0c 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -13,6 +13,7 @@ using Nini.Config; | |||
13 | using Nwc.XmlRpc; | 13 | using Nwc.XmlRpc; |
14 | using System.Collections; | 14 | using System.Collections; |
15 | using System.Timers; | 15 | using System.Timers; |
16 | using libsecondlife; | ||
16 | 17 | ||
17 | [assembly: Addin] | 18 | [assembly: Addin] |
18 | [assembly: AddinDependency("OpenSim", "0.4")] | 19 | [assembly: AddinDependency("OpenSim", "0.4")] |
@@ -37,9 +38,36 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
37 | m_httpd.AddXmlRPCHandler("admin_create_region", XmlRpcCreateRegionMethod); | 38 | m_httpd.AddXmlRPCHandler("admin_create_region", XmlRpcCreateRegionMethod); |
38 | m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); | 39 | m_httpd.AddXmlRPCHandler("admin_shutdown", XmlRpcShutdownMethod); |
39 | m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); | 40 | m_httpd.AddXmlRPCHandler("admin_broadcast", XmlRpcAlertMethod); |
41 | m_httpd.AddXmlRPCHandler("admin_restart", XmlRpcRestartMethod); | ||
40 | } | 42 | } |
41 | } | 43 | } |
42 | 44 | ||
45 | public XmlRpcResponse XmlRpcRestartMethod(XmlRpcRequest request) | ||
46 | { | ||
47 | XmlRpcResponse response = new XmlRpcResponse(); | ||
48 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
49 | |||
50 | LLUUID regionID = new LLUUID((string)requestData["regionID"]); | ||
51 | |||
52 | Hashtable responseData = new Hashtable(); | ||
53 | responseData["accepted"] = "true"; | ||
54 | response.Value = responseData; | ||
55 | |||
56 | OpenSim.Region.Environment.Scenes.Scene RebootedScene; | ||
57 | |||
58 | if (m_app.SceneManager.TryGetScene(regionID, out RebootedScene)) | ||
59 | { | ||
60 | responseData["rebooting"] = "true"; | ||
61 | RebootedScene.Restart(30); | ||
62 | } | ||
63 | else | ||
64 | { | ||
65 | responseData["rebooting"] = "false"; | ||
66 | } | ||
67 | |||
68 | return response; | ||
69 | } | ||
70 | |||
43 | public XmlRpcResponse XmlRpcAlertMethod(XmlRpcRequest request) | 71 | public XmlRpcResponse XmlRpcAlertMethod(XmlRpcRequest request) |
44 | { | 72 | { |
45 | XmlRpcResponse response = new XmlRpcResponse(); | 73 | XmlRpcResponse response = new XmlRpcResponse(); |