diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 23 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 20 |
2 files changed, 34 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index fcb6991..1d63d26 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -115,6 +115,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
115 | Environment.Exit(1); | 115 | Environment.Exit(1); |
116 | } | 116 | } |
117 | 117 | ||
118 | List<IScene> createdScenes = new List<IScene>(); | ||
119 | |||
118 | for (int i = 0; i < regionsToLoad.Length; i++) | 120 | for (int i = 0; i < regionsToLoad.Length; i++) |
119 | { | 121 | { |
120 | IScene scene; | 122 | IScene scene; |
@@ -123,17 +125,22 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
123 | ")"); | 125 | ")"); |
124 | 126 | ||
125 | bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); | 127 | bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); |
128 | |||
126 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); | 129 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); |
130 | createdScenes.Add(scene); | ||
131 | |||
127 | if (changed) | 132 | if (changed) |
128 | regionsToLoad[i].EstateSettings.Save(); | 133 | regionsToLoad[i].EstateSettings.Save(); |
129 | 134 | } | |
130 | if (scene != null) | 135 | |
136 | foreach (IScene scene in createdScenes) | ||
137 | { | ||
138 | scene.Start(); | ||
139 | |||
140 | m_newRegionCreatedHandler = OnNewRegionCreated; | ||
141 | if (m_newRegionCreatedHandler != null) | ||
131 | { | 142 | { |
132 | m_newRegionCreatedHandler = OnNewRegionCreated; | 143 | m_newRegionCreatedHandler(scene); |
133 | if (m_newRegionCreatedHandler != null) | ||
134 | { | ||
135 | m_newRegionCreatedHandler(scene); | ||
136 | } | ||
137 | } | 144 | } |
138 | } | 145 | } |
139 | } | 146 | } |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e50dac6..729667c 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -161,6 +161,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
161 | availableMethods["admin_acl_add"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListAdd); | 161 | availableMethods["admin_acl_add"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListAdd); |
162 | availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove); | 162 | availableMethods["admin_acl_remove"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListRemove); |
163 | availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList); | 163 | availableMethods["admin_acl_list"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcAccessListList); |
164 | availableMethods["admin_estate_reload"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcEstateReload); | ||
164 | 165 | ||
165 | // Misc | 166 | // Misc |
166 | availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); | 167 | availableMethods["admin_refresh_search"] = (req, ep) => InvokeXmlRpcMethod(req, ep, XmlRpcRefreshSearch); |
@@ -831,6 +832,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
831 | 832 | ||
832 | IScene newScene; | 833 | IScene newScene; |
833 | m_application.CreateRegion(region, out newScene); | 834 | m_application.CreateRegion(region, out newScene); |
835 | newScene.Start(); | ||
834 | 836 | ||
835 | // If an access specification was provided, use it. | 837 | // If an access specification was provided, use it. |
836 | // Otherwise accept the default. | 838 | // Otherwise accept the default. |
@@ -1225,7 +1227,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1225 | { | 1227 | { |
1226 | GridUserInfo userInfo = m_application.SceneManager.CurrentOrFirstScene.GridUserService.GetGridUserInfo(account.PrincipalID.ToString()); | 1228 | GridUserInfo userInfo = m_application.SceneManager.CurrentOrFirstScene.GridUserService.GetGridUserInfo(account.PrincipalID.ToString()); |
1227 | if (userInfo != null) | 1229 | if (userInfo != null) |
1228 | responseData["lastlogin"] = userInfo.Login; | 1230 | responseData["lastlogin"] = Util.ToUnixTime(userInfo.Login); |
1229 | else | 1231 | else |
1230 | responseData["lastlogin"] = 0; | 1232 | responseData["lastlogin"] = 0; |
1231 | 1233 | ||
@@ -1902,6 +1904,22 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1902 | m_log.Info("[RADMIN]: Access List List Request complete"); | 1904 | m_log.Info("[RADMIN]: Access List List Request complete"); |
1903 | } | 1905 | } |
1904 | 1906 | ||
1907 | private void XmlRpcEstateReload(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) | ||
1908 | { | ||
1909 | m_log.Info("[RADMIN]: Received Estate Reload Request"); | ||
1910 | |||
1911 | Hashtable responseData = (Hashtable)response.Value; | ||
1912 | // Hashtable requestData = (Hashtable)request.Params[0]; | ||
1913 | |||
1914 | m_application.SceneManager.ForEachScene(s => | ||
1915 | s.RegionInfo.EstateSettings = m_application.EstateDataService.LoadEstateSettings(s.RegionInfo.RegionID, false) | ||
1916 | ); | ||
1917 | |||
1918 | responseData["success"] = true; | ||
1919 | |||
1920 | m_log.Info("[RADMIN]: Estate Reload Request complete"); | ||
1921 | } | ||
1922 | |||
1905 | private void XmlRpcGetAgentsMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) | 1923 | private void XmlRpcGetAgentsMethod(XmlRpcRequest request, XmlRpcResponse response, IPEndPoint remoteClient) |
1906 | { | 1924 | { |
1907 | Hashtable responseData = (Hashtable)response.Value; | 1925 | Hashtable responseData = (Hashtable)response.Value; |