aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
authorSean Dague2007-10-05 19:33:26 +0000
committerSean Dague2007-10-05 19:33:26 +0000
commit29aa41daa004531cc41649c1818e4e432600cc32 (patch)
tree6d2e3574b7222137a83fc6ba6502b197efb89bfc /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
parentgetting all our line endings consistant again (diff)
downloadopensim-SC_OLD-29aa41daa004531cc41649c1818e4e432600cc32.zip
opensim-SC_OLD-29aa41daa004531cc41649c1818e4e432600cc32.tar.gz
opensim-SC_OLD-29aa41daa004531cc41649c1818e4e432600cc32.tar.bz2
opensim-SC_OLD-29aa41daa004531cc41649c1818e4e432600cc32.tar.xz
Code from Illumious Beltran (IBM) implementing more LSL
The functions implemented are: llListen llListenControl llListenRemove llOpenRemoteDataChannel llCloseRemoteDataChannel llRemoteDataReply The events implemented are: listen remote_data
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs67
1 files changed, 60 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 6838f47..3985273 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -177,14 +177,19 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
177 //type for whisper is 0 177 //type for whisper is 0
178 World.SimChat(Helpers.StringToField(text), 178 World.SimChat(Helpers.StringToField(text),
179 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 179 0, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
180
181 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
182 wComm.DeliverMessage(m_host.UUID.ToString(), 0, channelID, m_host.Name, text);
180 } 183 }
181 184
182 public void llSay(int channelID, string text) 185 public void llSay(int channelID, string text)
183 { 186 {
184 //type for say is 1 187 //type for say is 1
185
186 World.SimChat(Helpers.StringToField(text), 188 World.SimChat(Helpers.StringToField(text),
187 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 189 1, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
190
191 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
192 wComm.DeliverMessage(m_host.UUID.ToString(), 1, channelID, m_host.Name, text);
188 } 193 }
189 194
190 public void llShout(int channelID, string text) 195 public void llShout(int channelID, string text)
@@ -192,11 +197,32 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
192 //type for shout is 2 197 //type for shout is 2
193 World.SimChat(Helpers.StringToField(text), 198 World.SimChat(Helpers.StringToField(text),
194 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 199 2, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
200
201 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
202 wComm.DeliverMessage(m_host.UUID.ToString(), 2, channelID, m_host.Name, text);
203 }
204
205 public int llListen(int channelID, string name, string ID, string msg) {
206
207 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
208 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, ID, msg);
209
210 }
211
212 public void llListenControl(int number, int active) {
213
214 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
215 wComm.ListenControl(number, active);
216
217 }
218
219 public void llListenRemove(int number) {
220
221 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
222 wComm.ListenRemove(number);
223
195 } 224 }
196 225
197 public int llListen(int channelID, string name, string ID, string msg) { NotImplemented("llListen"); return 0; }
198 public void llListenControl(int number, int active) { NotImplemented("llListenControl"); return; }
199 public void llListenRemove(int number) { NotImplemented("llListenRemove"); return; }
200 public void llSensor(string name, string id, int type, double range, double arc) { NotImplemented("llSensor"); return; } 226 public void llSensor(string name, string id, int type, double range, double arc) { NotImplemented("llSensor"); return; }
201 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) { NotImplemented("llSensorRepeat"); return; } 227 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) { NotImplemented("llSensorRepeat"); return; }
202 public void llSensorRemove() { NotImplemented("llSensorRemove"); return; } 228 public void llSensorRemove() { NotImplemented("llSensorRemove"); return; }
@@ -927,10 +953,37 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
927 public void llRemoteLoadScript() { NotImplemented("llRemoteLoadScript"); } 953 public void llRemoteLoadScript() { NotImplemented("llRemoteLoadScript"); }
928 public void llSetRemoteScriptAccessPin(int pin) { NotImplemented("llSetRemoteScriptAccessPin"); } 954 public void llSetRemoteScriptAccessPin(int pin) { NotImplemented("llSetRemoteScriptAccessPin"); }
929 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) { NotImplemented("llRemoteLoadScriptPin"); } 955 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) { NotImplemented("llRemoteLoadScriptPin"); }
930 public void llOpenRemoteDataChannel() { NotImplemented("llOpenRemoteDataChannel"); } 956
957 // remote_data(integer type, key channel, key message_id, string sender, integer ival, string sval)
958 // Not sure where these constants should live:
959 // REMOTE_DATA_CHANNEL = 1
960 // REMOTE_DATA_REQUEST = 2
961 // REMOTE_DATA_REPLY = 3
962 public void llOpenRemoteDataChannel() {
963
964 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
965 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID);
966 object[] resobj = new object[] { 1, channelID.ToString(), LLUUID.Zero.ToString(), "", 0, "" };
967 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", resobj);
968
969 }
970
931 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { NotImplemented("llSendRemoteData"); return ""; } 971 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { NotImplemented("llSendRemoteData"); return ""; }
932 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { NotImplemented("llRemoteDataReply"); } 972
933 public void llCloseRemoteDataChannel(string channel) { NotImplemented("llCloseRemoteDataChannel"); } 973 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata)
974 {
975
976 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
977 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
978
979 }
980
981 public void llCloseRemoteDataChannel(string channel) {
982
983 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
984 xmlrpcMod.CloseXMLRPCChannel(channel);
985
986 }
934 987
935 public string llMD5String(string src, int nonce) 988 public string llMD5String(string src, int nonce)
936 { 989 {