aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTedd Hansen2008-01-05 15:48:02 +0000
committerTedd Hansen2008-01-05 15:48:02 +0000
commit966f639ad6c83828d8e60ef9103ad61c360f9c3b (patch)
tree020ff9c0666d8e8980c920afd77e34660fc121f3
parentAdded errorhandler+tip that grid server might not be running on grid registra... (diff)
downloadopensim-SC_OLD-966f639ad6c83828d8e60ef9103ad61c360f9c3b.zip
opensim-SC_OLD-966f639ad6c83828d8e60ef9103ad61c360f9c3b.tar.gz
opensim-SC_OLD-966f639ad6c83828d8e60ef9103ad61c360f9c3b.tar.bz2
opensim-SC_OLD-966f639ad6c83828d8e60ef9103ad61c360f9c3b.tar.xz
Changes to ScriptServer to (hopefully) make it compile on both .Net and Mono.
Some debug info for startup added to find bugs. ++
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs4
-rw-r--r--OpenSim/Framework/ConfigurationMember.cs7
-rw-r--r--OpenSim/Grid/ScriptServer/RemotingObject.cs18
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs8
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs52
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs565
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs2
-rw-r--r--bin/OpenSim.ini.example2
-rw-r--r--prebuild.xml26
12 files changed, 259 insertions, 438 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index b897c60..4c1c1d2 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -63,7 +63,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
63 63
64 for (int i = 0; i < regionsToLoad.Length; i++) 64 for (int i = 0; i < regionsToLoad.Length; i++)
65 { 65 {
66 MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName); 66 MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
67 openSim.CreateRegion(regionsToLoad[i]); 67 openSim.CreateRegion(regionsToLoad[i]);
68 } 68 }
69 69
@@ -93,7 +93,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
93 { 93 {
94 if (regionhandle == regionsToLoad[i].RegionHandle) 94 if (regionhandle == regionsToLoad[i].RegionHandle)
95 { 95 {
96 MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName); 96 MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")");
97 openSim.CreateRegion(regionsToLoad[i]); 97 openSim.CreateRegion(regionsToLoad[i]);
98 } 98 }
99 } 99 }
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 2def070..4ae59d6 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -147,8 +147,15 @@ namespace OpenSim.Framework
147 checkAndAddConfigOption(configOption); 147 checkAndAddConfigOption(configOption);
148 } 148 }
149 149
150
151 // TEMP - REMOVE
152 private int cE = 0;
150 public void performConfigurationRetrieve() 153 public void performConfigurationRetrieve()
151 { 154 {
155 if (cE > 1)
156 MainLog.Instance.Error("READING CONFIGURATION COUT: " + cE.ToString());
157
158
152 configurationPlugin = LoadConfigDll(configurationPluginFilename); 159 configurationPlugin = LoadConfigDll(configurationPluginFilename);
153 configurationOptions.Clear(); 160 configurationOptions.Clear();
154 if (loadFunction == null) 161 if (loadFunction == null)
diff --git a/OpenSim/Grid/ScriptServer/RemotingObject.cs b/OpenSim/Grid/ScriptServer/RemotingObject.cs
index 2d5936e..915d020 100644
--- a/OpenSim/Grid/ScriptServer/RemotingObject.cs
+++ b/OpenSim/Grid/ScriptServer/RemotingObject.cs
@@ -2,26 +2,26 @@
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenSim.Region.Environment.Interfaces; 4using OpenSim.Region.Environment.Interfaces;
5using OpenSim.Region.ScriptEngine.DotNetEngine; 5using OpenSim.Region.ScriptEngine.Common;
6 6
7namespace OpenSim.Grid.ScriptServer 7namespace OpenSim.Grid.ScriptServer
8{ 8{
9 public class RemotingObject : MarshalByRefObject 9 public class RemotingObject : MarshalByRefObject, ScriptServerInterfaces.ServerRemotingObject
10 { 10 {
11 // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance. 11 // This object will be exposed over remoting. It is a singleton, so it exists only in as one instance.
12 12
13 // Expose ScriptEngine directly for now ... this is not very secure :) 13 // Expose ScriptEngine directly for now ... this is not very secure :)
14 // NOTE! CURRENTLY JUST HARDWIRED DOTNETENGINE! 14 // NOTE! CURRENTLY JUST HARDWIRED DOTNETENGINE!
15 public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine ScriptEngine = new OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine(); 15 //private OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine SE =
16 // new OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine();
17 //public OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents Events =
18 // (OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents)SE.m_EventManager;
16 19
20 //private ScriptServerInterfaces.RemoteEvents _events = new abc;
17 21
18 /// <summary> 22 ScriptServerInterfaces.RemoteEvents ScriptServerInterfaces.ServerRemotingObject.Events()
19 /// Receives calls from remote grids.
20 /// </summary>
21 /// <returns></returns>
22 public OpenSim.Region.ScriptEngine.DotNetEngine.ScriptEngine GetScriptEngine()
23 { 23 {
24 return ScriptEngine; 24 return null;
25 } 25 }
26 } 26 }
27} 27}
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 831db22..e8453bc 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -331,8 +331,9 @@ namespace OpenSim
331 MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); 331 MainLog.Instance.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count);
332 332
333 foreach (TypeExtensionNode node in nodes) 333 foreach (TypeExtensionNode node in nodes)
334 { 334 {
335 IApplicationPlugin plugin = (IApplicationPlugin) node.CreateInstance(); 335 MainLog.Instance.Verbose("PLUGINS", "Loading OpenSim application plugin: ", node.GetType().AssemblyQualifiedName.ToString());
336 IApplicationPlugin plugin = (IApplicationPlugin)node.CreateInstance();
336 337
337 plugin.Initialise(this); 338 plugin.Initialise(this);
338 m_plugins.Add(plugin); 339 m_plugins.Add(plugin);
@@ -375,7 +376,10 @@ namespace OpenSim
375 376
376 m_moduleLoader.PickupModules(scene, "."); 377 m_moduleLoader.PickupModules(scene, ".");
377 //m_moduleLoader.PickupModules(scene, "ScriptEngines"); 378 //m_moduleLoader.PickupModules(scene, "ScriptEngines");
379 //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
380 MainLog.Instance.Verbose("MODULES", "Loading scripting engine modules");
378 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); 381 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene);
382
379 383
380 384
381 m_moduleLoader.InitialiseSharedModules(scene); 385 m_moduleLoader.InitialiseSharedModules(scene);
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 2b324f8..653139d 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -121,8 +121,8 @@ namespace OpenSim.Region.Communications.OGS1
121 GridResp = GridReq.Send(serversInfo.GridURL, 10000); 121 GridResp = GridReq.Send(serversInfo.GridURL, 10000);
122 } catch (Exception ex) 122 } catch (Exception ex)
123 { 123 {
124 MainLog.Instance.Error("Unable to connect to grid (Grid server not running?): " + ex.ToString()); 124 MainLog.Instance.Error("Unable to connect to grid. Grid server not running?");
125 return null; 125 throw(ex);
126 } 126 }
127 Hashtable GridRespData = (Hashtable)GridResp.Value; 127 Hashtable GridRespData = (Hashtable)GridResp.Value;
128 Hashtable griddatahash = GridRespData; 128 Hashtable griddatahash = GridRespData;
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
new file mode 100644
index 0000000..1e8917c
--- /dev/null
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
@@ -0,0 +1,52 @@
1using libsecondlife;
2using OpenSim.Framework;
3
4namespace OpenSim.Region.ScriptEngine.Common
5{
6 public class ScriptServerInterfaces
7 {
8 public interface RemoteEvents
9 {
10 void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient);
11 void OnRezScript(uint localID, LLUUID itemID, string script);
12 void OnRemoveScript(uint localID, LLUUID itemID);
13 void state_exit(uint localID, LLUUID itemID);
14 void touch(uint localID, LLUUID itemID);
15 void touch_end(uint localID, LLUUID itemID);
16 void collision_start(uint localID, LLUUID itemID);
17 void collision(uint localID, LLUUID itemID);
18 void collision_end(uint localID, LLUUID itemID);
19 void land_collision_start(uint localID, LLUUID itemID);
20 void land_collision(uint localID, LLUUID itemID);
21 void land_collision_end(uint localID, LLUUID itemID);
22 void timer(uint localID, LLUUID itemID);
23 void listen(uint localID, LLUUID itemID);
24 void on_rez(uint localID, LLUUID itemID);
25 void sensor(uint localID, LLUUID itemID);
26 void no_sensor(uint localID, LLUUID itemID);
27 void control(uint localID, LLUUID itemID);
28 void money(uint localID, LLUUID itemID);
29 void email(uint localID, LLUUID itemID);
30 void at_target(uint localID, LLUUID itemID);
31 void not_at_target(uint localID, LLUUID itemID);
32 void at_rot_target(uint localID, LLUUID itemID);
33 void not_at_rot_target(uint localID, LLUUID itemID);
34 void run_time_permissions(uint localID, LLUUID itemID);
35 void changed(uint localID, LLUUID itemID);
36 void attach(uint localID, LLUUID itemID);
37 void dataserver(uint localID, LLUUID itemID);
38 void link_message(uint localID, LLUUID itemID);
39 void moving_start(uint localID, LLUUID itemID);
40 void moving_end(uint localID, LLUUID itemID);
41 void object_rez(uint localID, LLUUID itemID);
42 void remote_data(uint localID, LLUUID itemID);
43 void http_response(uint localID, LLUUID itemID);
44 }
45
46 public interface ServerRemotingObject
47 {
48 RemoteEvents Events();
49 }
50
51 }
52}
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
index 16182f9..ad29feb 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
36 /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it. 36 /// Prepares events so they can be directly executed upon a script by EventQueueManager, then queues it.
37 /// </summary> 37 /// </summary>
38 [Serializable] 38 [Serializable]
39 public class EventManager 39 public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents
40 { 40 {
41 41
42 // 42 //
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
index 812b1c0..d56c1fb 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
@@ -29,8 +29,7 @@
29using System; 29using System;
30using libsecondlife; 30using libsecondlife;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Grid.ScriptServer; 32using OpenSim.Region.ScriptEngine.Common;
33using OpenSim.Region.ScriptEngine.DotNetEngine;
34 33
35namespace OpenSim.Region.ScriptEngine.RemoteServer 34namespace OpenSim.Region.ScriptEngine.RemoteServer
36{ 35{
@@ -41,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
41 internal class EventManager 40 internal class EventManager
42 { 41 {
43 42
44 System.Collections.Generic.Dictionary<uint, RemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, OpenSim.Grid.ScriptServer.RemotingObject>(); 43 System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>();
45 44
46 45
47 private ScriptEngine myScriptEngine; 46 private ScriptEngine myScriptEngine;
@@ -61,413 +60,183 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
61 public void OnRezScript(uint localID, LLUUID itemID, string script) 60 public void OnRezScript(uint localID, LLUUID itemID, string script)
62 { 61 {
63 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID 62 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID
64 OpenSim.Grid.ScriptServer.RemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); 63 myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)");
64 ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234);
65
65 remoteScript.Add(localID, obj); 66 remoteScript.Add(localID, obj);
66 try 67 //remoteScript[localID].Events.OnRezScript(localID, itemID, script);
67 { 68
68 remoteScript[localID].ScriptEngine.m_EventManager.OnRezScript(localID, itemID, script);
69 }
70 catch (System.NullReferenceException)
71 {
72 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
73 }
74 } 69 }
75 70
76 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 71 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
77 { 72 {
78 try 73 //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient);
79 {
80 remoteScript[localID].ScriptEngine.m_EventManager.touch_start(localID, offsetPos, remoteClient);
81 }
82 catch (System.NullReferenceException)
83 {
84 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
85 }
86 } 74 }
87 75
88 public void OnRemoveScript(uint localID, LLUUID itemID)
89 {
90 try
91 {
92 remoteScript[localID].ScriptEngine.m_EventManager.OnRemoveScript(localID, itemID);
93 }
94 catch (System.NullReferenceException)
95 {
96 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
97 }
98 }
99
100 public void state_exit(uint localID, LLUUID itemID)
101 {
102 try
103 {
104 remoteScript[localID].ScriptEngine.m_EventManager.state_exit(localID, itemID);
105 }
106 catch (System.NullReferenceException)
107 {
108 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
109 }
110 }
111
112 public void touch(uint localID, LLUUID itemID)
113 {
114 try
115 {
116 remoteScript[localID].ScriptEngine.m_EventManager.touch(localID, itemID);
117 }
118 catch (System.NullReferenceException)
119 {
120 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
121 }
122 }
123
124 public void touch_end(uint localID, LLUUID itemID)
125 {
126 try
127 {
128 remoteScript[localID].ScriptEngine.m_EventManager.touch_end(localID, itemID);
129 }
130 catch (System.NullReferenceException)
131 {
132 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
133 }
134 }
135
136 public void collision_start(uint localID, LLUUID itemID)
137 {
138 try
139 {
140 remoteScript[localID].ScriptEngine.m_EventManager.collision_start(localID, itemID);
141 }
142 catch (System.NullReferenceException)
143 {
144 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
145 }
146 }
147
148 public void collision(uint localID, LLUUID itemID)
149 {
150 try
151 {
152 remoteScript[localID].ScriptEngine.m_EventManager.collision(localID, itemID);
153 }
154 catch (System.NullReferenceException)
155 {
156 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
157 }
158 }
159
160 public void collision_end(uint localID, LLUUID itemID)
161 {
162 try
163 {
164 remoteScript[localID].ScriptEngine.m_EventManager.collision_end(localID, itemID);
165 }
166 catch (System.NullReferenceException)
167 {
168 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
169 }
170 }
171
172 public void land_collision_start(uint localID, LLUUID itemID)
173 {
174 try
175 {
176 remoteScript[localID].ScriptEngine.m_EventManager.land_collision_start(localID, itemID);
177 }
178 catch (System.NullReferenceException)
179 {
180 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
181 }
182 }
183
184 public void land_collision(uint localID, LLUUID itemID)
185 {
186 try
187 {
188 remoteScript[localID].ScriptEngine.m_EventManager.land_collision(localID, itemID);
189 }
190 catch (System.NullReferenceException)
191 {
192 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
193 }
194 }
195
196 public void land_collision_end(uint localID, LLUUID itemID)
197 {
198 try
199 {
200 remoteScript[localID].ScriptEngine.m_EventManager.land_collision_end(localID, itemID);
201 }
202 catch (System.NullReferenceException)
203 {
204 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
205 }
206 }
207
208 public void timer(uint localID, LLUUID itemID)
209 {
210 try
211 {
212 remoteScript[localID].ScriptEngine.m_EventManager.timer(localID, itemID);
213 }
214 catch (System.NullReferenceException)
215 {
216 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
217 }
218 }
219
220 public void listen(uint localID, LLUUID itemID)
221 {
222 try
223 {
224 remoteScript[localID].ScriptEngine.m_EventManager.listen(localID, itemID);
225 }
226 catch (System.NullReferenceException)
227 {
228 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
229 }
230 }
231
232 public void on_rez(uint localID, LLUUID itemID)
233 {
234 try
235 {
236 remoteScript[localID].ScriptEngine.m_EventManager.on_rez(localID, itemID);
237 }
238 catch (System.NullReferenceException)
239 {
240 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
241 }
242 }
243
244 public void sensor(uint localID, LLUUID itemID)
245 {
246 try
247 {
248 remoteScript[localID].ScriptEngine.m_EventManager.sensor(localID, itemID);
249 }
250 catch (System.NullReferenceException)
251 {
252 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
253 }
254 }
255
256 public void no_sensor(uint localID, LLUUID itemID)
257 {
258 try
259 {
260 remoteScript[localID].ScriptEngine.m_EventManager.no_sensor(localID, itemID);
261 }
262 catch (System.NullReferenceException)
263 {
264 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
265 }
266 }
267
268 public void control(uint localID, LLUUID itemID)
269 {
270 try
271 {
272 remoteScript[localID].ScriptEngine.m_EventManager.control(localID, itemID);
273 }
274 catch (System.NullReferenceException)
275 {
276 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
277 }
278 }
279 76
280 public void money(uint localID, LLUUID itemID)
281 {
282 try
283 {
284 remoteScript[localID].ScriptEngine.m_EventManager.money(localID, itemID);
285 }
286 catch (System.NullReferenceException)
287 {
288 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
289 }
290 }
291 77
292 public void email(uint localID, LLUUID itemID) 78 // PLACEHOLDERS -- CODE WILL CHANGE!
293 { 79
294 try
295 {
296 remoteScript[localID].ScriptEngine.m_EventManager.email(localID, itemID);
297 }
298 catch (System.NullReferenceException)
299 {
300 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
301 }
302 }
303 80
304 public void at_target(uint localID, LLUUID itemID) 81 //public void OnRemoveScript(uint localID, LLUUID itemID)
305 { 82 //{
306 try 83 // remoteScript[localID].Events.OnRemoveScript(localID, itemID);
307 { 84 //}
308 remoteScript[localID].ScriptEngine.m_EventManager.at_target(localID, itemID);
309 }
310 catch (System.NullReferenceException)
311 {
312 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
313 }
314 }
315 85
316 public void not_at_target(uint localID, LLUUID itemID) 86 //public void state_exit(uint localID, LLUUID itemID)
317 { 87 //{
318 try 88 // remoteScript[localID].Events.state_exit(localID, itemID);
319 { 89 //}
320 remoteScript[localID].ScriptEngine.m_EventManager.not_at_target(localID, itemID);
321 }
322 catch (System.NullReferenceException)
323 {
324 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?");
325 }
326 }
327 90
328 public void at_rot_target(uint localID, LLUUID itemID) 91 //public void touch(uint localID, LLUUID itemID)
329 { 92 //{
330 try 93 // remoteScript[localID].Events.touch(localID, itemID);
331 { 94 //}
332 remoteScript[localID].ScriptEngine.m_EventManager.at_rot_target(localID, itemID); 95
333 } 96 //public void touch_end(uint localID, LLUUID itemID)
334 catch (System.NullReferenceException) 97 //{
335 { 98 // remoteScript[localID].Events.touch_end(localID, itemID);
336 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 99 //}
337 } 100
338 } 101 //public void collision_start(uint localID, LLUUID itemID)
339 102 //{
340 public void not_at_rot_target(uint localID, LLUUID itemID) 103 // remoteScript[localID].Events.collision_start(localID, itemID);
341 { 104 //}
342 try 105
343 { 106 //public void collision(uint localID, LLUUID itemID)
344 remoteScript[localID].ScriptEngine.m_EventManager.not_at_rot_target(localID, itemID); 107 //{
345 } 108 // remoteScript[localID].Events.collision(localID, itemID);
346 catch (System.NullReferenceException) 109 //}
347 { 110
348 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 111 //public void collision_end(uint localID, LLUUID itemID)
349 } 112 //{
350 } 113 // remoteScript[localID].Events.collision_end(localID, itemID);
351 114 //}
352 public void run_time_permissions(uint localID, LLUUID itemID) 115
353 { 116 //public void land_collision_start(uint localID, LLUUID itemID)
354 try 117 //{
355 { 118 // remoteScript[localID].Events.land_collision_start(localID, itemID);
356 remoteScript[localID].ScriptEngine.m_EventManager.run_time_permissions(localID, itemID); 119 //}
357 } 120
358 catch (System.NullReferenceException) 121 //public void land_collision(uint localID, LLUUID itemID)
359 { 122 //{
360 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 123 // remoteScript[localID].Events.land_collision(localID, itemID);
361 } 124 //}
362 } 125
363 126 //public void land_collision_end(uint localID, LLUUID itemID)
364 public void changed(uint localID, LLUUID itemID) 127 //{
365 { 128 // remoteScript[localID].Events.land_collision_end(localID, itemID);
366 try 129 //}
367 { 130
368 remoteScript[localID].ScriptEngine.m_EventManager.changed(localID, itemID); 131 //public void timer(uint localID, LLUUID itemID)
369 } 132 //{
370 catch (System.NullReferenceException) 133 // remoteScript[localID].Events.timer(localID, itemID);
371 { 134 //}
372 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 135
373 } 136 //public void listen(uint localID, LLUUID itemID)
374 } 137 //{
375 138 // remoteScript[localID].Events.listen(localID, itemID);
376 public void attach(uint localID, LLUUID itemID) 139 //}
377 { 140
378 try 141 //public void on_rez(uint localID, LLUUID itemID)
379 { 142 //{
380 remoteScript[localID].ScriptEngine.m_EventManager.attach(localID, itemID); 143 // remoteScript[localID].Events.on_rez(localID, itemID);
381 } 144 //}
382 catch (System.NullReferenceException) 145
383 { 146 //public void sensor(uint localID, LLUUID itemID)
384 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 147 //{
385 } 148 // remoteScript[localID].Events.sensor(localID, itemID);
386 } 149 //}
387 150
388 public void dataserver(uint localID, LLUUID itemID) 151 //public void no_sensor(uint localID, LLUUID itemID)
389 { 152 //{
390 try 153 // remoteScript[localID].Events.no_sensor(localID, itemID);
391 { 154 //}
392 remoteScript[localID].ScriptEngine.m_EventManager.dataserver(localID, itemID); 155
393 } 156 //public void control(uint localID, LLUUID itemID)
394 catch (System.NullReferenceException) 157 //{
395 { 158 // remoteScript[localID].Events.control(localID, itemID);
396 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 159 //}
397 } 160
398 } 161 //public void money(uint localID, LLUUID itemID)
399 162 //{
400 public void link_message(uint localID, LLUUID itemID) 163 // remoteScript[localID].Events.money(localID, itemID);
401 { 164 //}
402 try 165
403 { 166 //public void email(uint localID, LLUUID itemID)
404 remoteScript[localID].ScriptEngine.m_EventManager.link_message(localID, itemID); 167 //{
405 } 168 // remoteScript[localID].Events.email(localID, itemID);
406 catch (System.NullReferenceException) 169 //}
407 { 170
408 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 171 //public void at_target(uint localID, LLUUID itemID)
409 } 172 //{
410 } 173 // remoteScript[localID].Events.at_target(localID, itemID);
411 174 //}
412 public void moving_start(uint localID, LLUUID itemID) 175
413 { 176 //public void not_at_target(uint localID, LLUUID itemID)
414 try 177 //{
415 { 178 // remoteScript[localID].Events.not_at_target(localID, itemID);
416 remoteScript[localID].ScriptEngine.m_EventManager.moving_start(localID, itemID); 179 //}
417 } 180
418 catch (System.NullReferenceException) 181 //public void at_rot_target(uint localID, LLUUID itemID)
419 { 182 //{
420 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 183 // remoteScript[localID].Events.at_rot_target(localID, itemID);
421 } 184 //}
422 } 185
423 186 //public void not_at_rot_target(uint localID, LLUUID itemID)
424 public void moving_end(uint localID, LLUUID itemID) 187 //{
425 { 188 // remoteScript[localID].Events.not_at_rot_target(localID, itemID);
426 try 189 //}
427 { 190
428 remoteScript[localID].ScriptEngine.m_EventManager.moving_end(localID, itemID); 191 //public void run_time_permissions(uint localID, LLUUID itemID)
429 } 192 //{
430 catch (System.NullReferenceException) 193 // remoteScript[localID].Events.run_time_permissions(localID, itemID);
431 { 194 //}
432 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 195
433 } 196 //public void changed(uint localID, LLUUID itemID)
434 } 197 //{
435 198 // remoteScript[localID].Events.changed(localID, itemID);
436 public void object_rez(uint localID, LLUUID itemID) 199 //}
437 { 200
438 try 201 //public void attach(uint localID, LLUUID itemID)
439 { 202 //{
440 remoteScript[localID].ScriptEngine.m_EventManager.object_rez(localID, itemID); 203 // remoteScript[localID].Events.attach(localID, itemID);
441 } 204 //}
442 catch (System.NullReferenceException) 205
443 { 206 //public void dataserver(uint localID, LLUUID itemID)
444 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 207 //{
445 } 208 // remoteScript[localID].Events.dataserver(localID, itemID);
446 } 209 //}
447 210
448 public void remote_data(uint localID, LLUUID itemID) 211 //public void link_message(uint localID, LLUUID itemID)
449 { 212 //{
450 try 213 // remoteScript[localID].Events.link_message(localID, itemID);
451 { 214 //}
452 remoteScript[localID].ScriptEngine.m_EventManager.remote_data(localID, itemID); 215
453 } 216 //public void moving_start(uint localID, LLUUID itemID)
454 catch (System.NullReferenceException) 217 //{
455 { 218 // remoteScript[localID].Events.moving_start(localID, itemID);
456 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 219 //}
457 } 220
458 } 221 //public void moving_end(uint localID, LLUUID itemID)
459 222 //{
460 public void http_response(uint localID, LLUUID itemID) 223 // remoteScript[localID].Events.moving_end(localID, itemID);
461 { 224 //}
462 try 225
463 { 226 //public void object_rez(uint localID, LLUUID itemID)
464 remoteScript[localID].ScriptEngine.m_EventManager.http_response(localID, itemID); 227 //{
465 } 228 // remoteScript[localID].Events.object_rez(localID, itemID);
466 catch (System.NullReferenceException) 229 //}
467 { 230
468 OpenSim.Framework.Console.MainLog.Instance.Error("SCRIPTS", "Error Connecting to Remote Script Server. Is it running?"); 231 //public void remote_data(uint localID, LLUUID itemID)
469 } 232 //{
470 } 233 // remoteScript[localID].Events.remote_data(localID, itemID);
234 //}
235
236 //public void http_response(uint localID, LLUUID itemID)
237 //{
238 // remoteScript[localID].Events.http_response(localID, itemID);
239 //}
471 240
472 } 241 }
473} \ No newline at end of file 242} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
index 3c88c41..6fc6c5c 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/RemoteServer.cs
@@ -4,6 +4,7 @@ using System.Text;
4using System.Runtime.Remoting; 4using System.Runtime.Remoting;
5using System.Runtime.Remoting.Channels; 5using System.Runtime.Remoting.Channels;
6using System.Runtime.Remoting.Channels.Tcp; 6using System.Runtime.Remoting.Channels.Tcp;
7using OpenSim.Region.ScriptEngine.Common;
7 8
8namespace OpenSim.Region.ScriptEngine.RemoteServer 9namespace OpenSim.Region.ScriptEngine.RemoteServer
9{ 10{
@@ -12,7 +13,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
12 // Handles connections to servers 13 // Handles connections to servers
13 // Create and returns server object 14 // Create and returns server object
14 15
15 public OpenSim.Grid.ScriptServer.RemotingObject Connect(string hostname, int port) 16 public ScriptServerInterfaces.ServerRemotingObject Connect(string hostname, int port)
16 { 17 {
17 // Create a channel for communicating w/ the remote object 18 // Create a channel for communicating w/ the remote object
18 // Notice no port is specified on the client 19 // Notice no port is specified on the client
@@ -29,8 +30,8 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
29 { 30 {
30 31
31 // Create an instance of the remote object 32 // Create an instance of the remote object
32 OpenSim.Grid.ScriptServer.RemotingObject obj = (OpenSim.Grid.ScriptServer.RemotingObject)Activator.GetObject( 33 ScriptServerInterfaces.ServerRemotingObject obj = (ScriptServerInterfaces.ServerRemotingObject)Activator.GetObject(
33 typeof(OpenSim.Grid.ScriptServer.RemotingObject), 34 typeof(ScriptServerInterfaces.ServerRemotingObject),
34 "tcp://" + hostname + ":" + port + "/DotNetEngine"); 35 "tcp://" + hostname + ":" + port + "/DotNetEngine");
35 36
36 // Use the object 37 // Use the object
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs
index 9d3b989..d0dc7ab 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
92 92
93 public string Name 93 public string Name
94 { 94 {
95 get { return "LSLScriptingModule"; } 95 get { return "RemoteServerScriptingModule"; }
96 } 96 }
97 97
98 public bool IsSharedModule 98 public bool IsSharedModule
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index e081d4e..08ce5cd 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -44,7 +44,7 @@ verbose = true
44; ScriptEngine 44; ScriptEngine
45script_engine = OpenSim.Region.ScriptEngine.DotNetEngine.dll 45script_engine = OpenSim.Region.ScriptEngine.DotNetEngine.dll
46;Experimental remote ScriptServer plugin: 46;Experimental remote ScriptServer plugin:
47;script_engine = OpenSim.Region.ScriptEngine.RemoteEngine.dll 47;script_engine = OpenSim.Region.ScriptEngine.RemoteServer.dll
48 48
49 49
50; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true. 50; if you would like to allow prim to be physical and move by physics with the physical checkbox in the client set this to true.
diff --git a/prebuild.xml b/prebuild.xml
index b65466c..ad726bd 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1140,6 +1140,8 @@
1140 <Reference name="System" localCopy="false"/> 1140 <Reference name="System" localCopy="false"/>
1141 <Reference name="System.Data" localCopy="false"/> 1141 <Reference name="System.Data" localCopy="false"/>
1142 <Reference name="System.Xml" localCopy="false"/> 1142 <Reference name="System.Xml" localCopy="false"/>
1143 <Reference name="libsecondlife.dll"/>
1144 <Reference name="OpenSim.Framework"/>
1143 <Files> 1145 <Files>
1144 <Match pattern="*.cs" recurse="true"/> 1146 <Match pattern="*.cs" recurse="true"/>
1145 </Files> 1147 </Files>
@@ -1195,7 +1197,7 @@
1195 </Configuration> 1197 </Configuration>
1196 1198
1197 <ReferencePath>../../../bin/</ReferencePath> 1199 <ReferencePath>../../../bin/</ReferencePath>
1198 <ReferencePath>../../../bin/ScriptEngines/</ReferencePath> 1200 <ReferencePath>../../../bin/ScriptEngines/</ReferencePath>
1199 <Reference name="System" localCopy="false"/> 1201 <Reference name="System" localCopy="false"/>
1200 <Reference name="System.Data" localCopy="false"/> 1202 <Reference name="System.Data" localCopy="false"/>
1201 <Reference name="System.Runtime.Remoting" localCopy="false"/> 1203 <Reference name="System.Runtime.Remoting" localCopy="false"/>
@@ -1206,13 +1208,6 @@
1206 <Reference name="OpenSim.Framework.Servers"/> 1208 <Reference name="OpenSim.Framework.Servers"/>
1207 <Reference name="OpenSim.Framework.Data"/> 1209 <Reference name="OpenSim.Framework.Data"/>
1208 <Reference name="OpenSim.Region.Environment"/> 1210 <Reference name="OpenSim.Region.Environment"/>
1209
1210 <!-- Explicit path since without it, the generated .build file does not correctly reference
1211 the DotNetEngine assembly in bin/ScriptEngines (instead looking in simply bin/)
1212 despite the bin/ScriptEngines reference path. Hardcoding is not a permanent solution and
1213 may cause some warnings in Visual Studio -->
1214 <Reference name="../../../bin/ScriptEngines/OpenSim.Region.ScriptEngine.DotNetEngine"/>
1215
1216 <Reference name="OpenSim.Region.ScriptEngine.Common"/> 1211 <Reference name="OpenSim.Region.ScriptEngine.Common"/>
1217 <Reference name="libsecondlife.dll"/> 1212 <Reference name="libsecondlife.dll"/>
1218 <Reference name="Axiom.MathLib.dll" localCopy="false"/> 1213 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
@@ -1223,6 +1218,7 @@
1223 </Files> 1218 </Files>
1224 </Project> 1219 </Project>
1225 1220
1221
1226 <Project name="OpenSim.Region.ScriptEngine.RemoteServer" path="OpenSim/Region/ScriptEngine/RemoteServer" type="Library"> 1222 <Project name="OpenSim.Region.ScriptEngine.RemoteServer" path="OpenSim/Region/ScriptEngine/RemoteServer" type="Library">
1227 <Configuration name="Debug"> 1223 <Configuration name="Debug">
1228 <Options> 1224 <Options>
@@ -1243,21 +1239,13 @@
1243 <Reference name="System.Runtime.Remoting" localCopy="false"/> 1239 <Reference name="System.Runtime.Remoting" localCopy="false"/>
1244 <Reference name="OpenSim.Region.Environment" /> 1240 <Reference name="OpenSim.Region.Environment" />
1245 <Reference name="libsecondlife.dll"/> 1241 <Reference name="libsecondlife.dll"/>
1246 <Reference name="RAIL.dll"/>
1247 <Reference name="OpenSim.Framework"/> 1242 <Reference name="OpenSim.Framework"/>
1248 <Reference name="OpenSim.Framework.Console"/> 1243 <Reference name="OpenSim.Framework.Console"/>
1249 <Reference name="OpenSim.Region.ScriptEngine.Common"/> 1244 <Reference name="OpenSim.Region.ScriptEngine.Common"/>
1250 <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> 1245 <Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/>
1251 <Reference name="OpenSim.Grid.ScriptServer"/>
1252
1253 <!-- Explicit path since without it, the generated .build file does not correctly reference
1254 the DotNetEngine assembly in bin/ScriptEngines (instead looking in simply bin/)
1255 despite the bin/ScriptEngines reference path. Hardcoding is not a permanent solution and
1256 may cause some warnings in Visual Studio -->
1257 <Reference name="../../../../bin/ScriptEngines/OpenSim.Region.ScriptEngine.DotNetEngine"/>
1258
1259 <Reference name="Axiom.MathLib.dll" localCopy="false"/>
1260 <Reference name="Nini.dll" /> 1246 <Reference name="Nini.dll" />
1247 <!-- Reference name="OpenSim.Grid.ScriptServer"/ -->
1248
1261 <Files> 1249 <Files>
1262 <Match pattern="*.cs" recurse="true"/> 1250 <Match pattern="*.cs" recurse="true"/>
1263 </Files> 1251 </Files>