This cleans up a merge mess from the earlier checkin and implements llOwnerSay()
via the newly created Scene.SimBroadcast() call.0.6.0-stable
parent
42cdf3c240
commit
1bb1d5d9b0
|
@ -85,6 +85,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
protected IScene m_scene;
|
protected IScene m_scene;
|
||||||
protected IClientAPI m_sender;
|
protected IClientAPI m_sender;
|
||||||
|
protected object m_senderObject;
|
||||||
protected ChatTypeEnum m_type;
|
protected ChatTypeEnum m_type;
|
||||||
protected LLUUID m_fromID;
|
protected LLUUID m_fromID;
|
||||||
|
|
||||||
|
@ -140,6 +141,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
#region IEventArgs Members
|
#region IEventArgs Members
|
||||||
|
|
||||||
|
/// TODO: Sender and SenderObject should just be Sender and of
|
||||||
|
/// type IChatSender
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The client responsible for sending the message, or null.
|
/// The client responsible for sending the message, or null.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -149,6 +153,15 @@ namespace OpenSim.Framework
|
||||||
set { m_sender = value; }
|
set { m_sender = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The object responsible for sending the message, or null.
|
||||||
|
/// </summary>
|
||||||
|
public object SenderObject
|
||||||
|
{
|
||||||
|
get { return m_senderObject; }
|
||||||
|
set { m_senderObject = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public LLUUID SenderUUID
|
public LLUUID SenderUUID
|
||||||
{
|
{
|
||||||
get { return m_fromID; }
|
get { return m_fromID; }
|
||||||
|
|
|
@ -57,7 +57,6 @@ namespace OpenSim.Grid.ScriptEngine.Common
|
||||||
LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r);
|
LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r);
|
||||||
LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end);
|
LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end);
|
||||||
void llWhisper(int channelID, string text);
|
void llWhisper(int channelID, string text);
|
||||||
//void llSay(int channelID, string text);
|
|
||||||
void llSay(int channelID, string text);
|
void llSay(int channelID, string text);
|
||||||
void llShout(int channelID, string text);
|
void llShout(int channelID, string text);
|
||||||
int llListen(int channelID, string name, string ID, string msg);
|
int llListen(int channelID, string name, string ID, string msg);
|
||||||
|
|
|
@ -243,6 +243,11 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||||
m_LSL_Functions.llShout(channelID, text);
|
m_LSL_Functions.llShout(channelID, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void llOwnerSay(string msg)
|
||||||
|
{
|
||||||
|
m_LSL_Functions.llOwnerSay(msg);
|
||||||
|
}
|
||||||
|
|
||||||
public int llListen(int channelID, string name, string ID, string msg)
|
public int llListen(int channelID, string name, string ID, string msg)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llListen(channelID, name, ID, msg);
|
return m_LSL_Functions.llListen(channelID, name, ID, msg);
|
||||||
|
@ -1617,11 +1622,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||||
return m_LSL_Functions.llGetInventoryCreator(item);
|
return m_LSL_Functions.llGetInventoryCreator(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llOwnerSay(string msg)
|
|
||||||
{
|
|
||||||
m_LSL_Functions.llOwnerSay(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void llRequestSimulatorData(string simulator, int data)
|
public void llRequestSimulatorData(string simulator, int data)
|
||||||
{
|
{
|
||||||
m_LSL_Functions.llRequestSimulatorData(simulator, data);
|
m_LSL_Functions.llRequestSimulatorData(simulator, data);
|
||||||
|
|
|
@ -272,19 +272,30 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
|
||||||
public void llWhisper(int channelID, string text)
|
public void llWhisper(int channelID, string text)
|
||||||
{
|
{
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition,
|
||||||
|
m_host.Name, m_host.UUID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSay(int channelID, string text)
|
public void llSay(int channelID, string text)
|
||||||
{
|
{
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Say, channelID, m_host.AbsolutePosition,
|
||||||
|
m_host.Name, m_host.UUID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llShout(int channelID, string text)
|
public void llShout(int channelID, string text)
|
||||||
{
|
{
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition,
|
||||||
|
m_host.Name, m_host.UUID, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void llOwnerSay(string msg)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("llOwnerSay(\"{0}\")", msg);
|
||||||
|
World.SimChatBroadcast(Helpers.StringToField(text),
|
||||||
|
ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
|
||||||
|
m_host.Name, m_host.UUID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int llListen(int channelID, string name, string ID, string msg)
|
public int llListen(int channelID, string name, string ID, string msg)
|
||||||
|
@ -2032,11 +2043,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llOwnerSay(string msg)
|
|
||||||
{
|
|
||||||
NotImplemented("llOwnerSay");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void llRequestSimulatorData(string simulator, int data)
|
public void llRequestSimulatorData(string simulator, int data)
|
||||||
{
|
{
|
||||||
NotImplemented("llRequestSimulatorData");
|
NotImplemented("llRequestSimulatorData");
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
#region ISimChat Members
|
#region ISimChat Members
|
||||||
public void SimBroadcast(Object sender, ChatFromViewerArgs c)
|
public void SimBroadcast(Object sender, ChatFromViewerArgs c)
|
||||||
{
|
{
|
||||||
// We only want to relay stuff on channel 0
|
// We only want to relay stuff on channel 0 and on the debug channel
|
||||||
if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
|
if (c.Channel != 0 && c.Channel != DEBUG_CHANNEL) return;
|
||||||
|
|
||||||
if (c.Channel == DEBUG_CHANNEL)
|
if (c.Channel == DEBUG_CHANNEL)
|
||||||
|
@ -118,12 +118,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
LLVector3 pos = new LLVector3(128, 128, 30);
|
LLVector3 pos = new LLVector3(128, 128, 30);
|
||||||
((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
|
((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
|
||||||
{
|
{
|
||||||
if (!presence.IsChildAgent) return;
|
if (presence.IsChildAgent) return;
|
||||||
|
|
||||||
presence.ControllingClient.SendChatMessage(c.Message,
|
IClientAPI client = presence.ControllingClient;
|
||||||
1, //255,
|
|
||||||
|
if ((c.Type == ChatTypeEnum.Owner) &&
|
||||||
|
(null != c.SenderObject) &&
|
||||||
|
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (null == c.SenderObject)
|
||||||
|
client.SendChatMessage(c.Message, (byte)c.Type,
|
||||||
pos, c.From, LLUUID.Zero,
|
pos, c.From, LLUUID.Zero,
|
||||||
c.Channel == DEBUG_CHANNEL? (byte)ChatSourceType.Object : (byte)ChatSourceType.Agent,
|
(byte)ChatSourceType.Agent,
|
||||||
|
(byte)ChatAudibleLevel.Fully);
|
||||||
|
else
|
||||||
|
client.SendChatMessage(c.Message, (byte)c.Type,
|
||||||
|
pos, c.From, LLUUID.Zero,
|
||||||
|
(byte)ChatSourceType.Object,
|
||||||
(byte)ChatAudibleLevel.Fully);
|
(byte)ChatAudibleLevel.Fully);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -147,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
string fromName = e.From;
|
string fromName = e.From;
|
||||||
string message = e.Message;
|
string message = e.Message;
|
||||||
LLUUID fromAgentID = e.SenderUUID;
|
LLUUID fromID = e.SenderUUID;
|
||||||
|
|
||||||
if (e.Sender != null)
|
if (e.Sender != null)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||||
fromName = avatar.Firstname + " " + avatar.Lastname;
|
fromName = avatar.Firstname + " " + avatar.Lastname;
|
||||||
fromAgentID = e.Sender.AgentId;
|
fromID = e.Sender.AgentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.Channel == DEBUG_CHANNEL)
|
if (e.Channel == DEBUG_CHANNEL)
|
||||||
|
@ -175,13 +187,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
if (e.Channel == DEBUG_CHANNEL)
|
if (e.Channel == DEBUG_CHANNEL)
|
||||||
{
|
{
|
||||||
TrySendChatMessage(presence, fromPos, regionPos,
|
TrySendChatMessage(presence, fromPos, regionPos,
|
||||||
fromAgentID, fromName, e.Type,
|
fromID, fromName, e.Type,
|
||||||
message, ChatSourceType.Object);
|
message, ChatSourceType.Object);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TrySendChatMessage(presence, fromPos, regionPos,
|
TrySendChatMessage(presence, fromPos, regionPos,
|
||||||
fromAgentID, fromName, e.Type,
|
fromID, fromName, e.Type,
|
||||||
message, ChatSourceType.Agent);
|
message, ChatSourceType.Agent);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -88,6 +88,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
{
|
{
|
||||||
m_irc = new IRCChatModule(config);
|
m_irc = new IRCChatModule(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_irc_connector == null)
|
if (m_irc_connector == null)
|
||||||
{
|
{
|
||||||
m_irc_connector = new Thread(IRCConnectRun);
|
m_irc_connector = new Thread(IRCConnectRun);
|
||||||
|
@ -183,6 +184,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
m_irc_connector.Name = "IRCConnectorThread";
|
m_irc_connector.Name = "IRCConnectorThread";
|
||||||
m_irc_connector.IsBackground = true;
|
m_irc_connector.IsBackground = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_irc_connector.IsAlive)
|
if (!m_irc_connector.IsAlive)
|
||||||
{
|
{
|
||||||
m_irc_connector.Start();
|
m_irc_connector.Start();
|
||||||
|
@ -196,21 +198,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
if (e.Message.StartsWith("/me ") && (null != avatar))
|
if (e.Message.StartsWith("/me ") && (null != avatar))
|
||||||
e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4));
|
e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4));
|
||||||
if (e.Channel == 0 || e.Channel == DEBUG_CHANNEL)
|
|
||||||
{
|
|
||||||
if (e.Channel == DEBUG_CHANNEL)
|
|
||||||
e.Type = ChatTypeEnum.DebugChannel;
|
|
||||||
|
|
||||||
// IRC stuff
|
// this is to keep objects from talking to IRC
|
||||||
if (e.Message.Length > 0 && e.Channel == 0)
|
if (m_irc.Connected && (avatar != null))
|
||||||
{
|
|
||||||
if (m_irc.Connected && (avatar != null)) // this is to keep objects from talking to IRC
|
|
||||||
{
|
|
||||||
m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message);
|
m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -528,14 +520,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
// Get some direct matches $1 $4 is a
|
// Get some direct matches $1 $4 is a
|
||||||
if ((matches.Count == 0) || (matches.Count != 1) || (matches[0].Groups.Count != 5))
|
if ((matches.Count == 0) || (matches.Count != 1) || (matches[0].Groups.Count != 5))
|
||||||
{
|
|
||||||
result = new Dictionary<string, string>();
|
|
||||||
result.Add("nick", matches[0].Groups[1].Value);
|
|
||||||
result.Add("user", matches[0].Groups[2].Value);
|
|
||||||
result.Add("channel", matches[0].Groups[3].Value);
|
|
||||||
result.Add("msg", matches[0].Groups[4].Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_log.Info("[IRC]: Number of matches: " + matches.Count);
|
m_log.Info("[IRC]: Number of matches: " + matches.Count);
|
||||||
if (matches.Count > 0)
|
if (matches.Count > 0)
|
||||||
|
@ -641,7 +625,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
public void BroadcastSim(string sender, string format, params string[] args)
|
public void BroadcastSim(string sender, string format, params string[] args)
|
||||||
{
|
{
|
||||||
LLVector3 pos = new LLVector3(128, 128, 20);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ChatFromViewerArgs c = new ChatFromViewerArgs();
|
ChatFromViewerArgs c = new ChatFromViewerArgs();
|
||||||
|
@ -781,8 +764,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||||
|
|
||||||
public void eventIrcMode(string[] commArgs)
|
public void eventIrcMode(string[] commArgs)
|
||||||
{
|
{
|
||||||
string IrcChannel = commArgs[2];
|
|
||||||
string IrcUser = commArgs[0].Split('!')[0];
|
|
||||||
string UserMode = "";
|
string UserMode = "";
|
||||||
for (int i = 3; i < commArgs.Length; i++)
|
for (int i = 3; i < commArgs.Length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,6 +34,39 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
public partial class Scene
|
public partial class Scene
|
||||||
{
|
{
|
||||||
|
protected void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
|
||||||
|
LLUUID fromID, bool fromAgent, bool broadcast)
|
||||||
|
{
|
||||||
|
ChatFromViewerArgs args = new ChatFromViewerArgs();
|
||||||
|
|
||||||
|
args.Message = Helpers.FieldToUTF8String(message);
|
||||||
|
args.Channel = channel;
|
||||||
|
args.Type = type;
|
||||||
|
args.Position = fromPos;
|
||||||
|
args.SenderUUID = fromID;
|
||||||
|
args.Scene = this;
|
||||||
|
|
||||||
|
if (fromAgent)
|
||||||
|
{
|
||||||
|
ScenePresence user = GetScenePresence(fromID);
|
||||||
|
if (user != null)
|
||||||
|
args.Sender = user.ControllingClient;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectPart obj = GetSceneObjectPart(fromID);
|
||||||
|
args.SenderObject = obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
args.From = fromName;
|
||||||
|
//args.
|
||||||
|
|
||||||
|
if (broadcast)
|
||||||
|
EventManager.TriggerOnChatBroadcast(this, args);
|
||||||
|
else
|
||||||
|
EventManager.TriggerOnChatFromWorld(this, args);
|
||||||
|
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -43,27 +76,23 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="fromName"></param>
|
/// <param name="fromName"></param>
|
||||||
/// <param name="fromAgentID"></param>
|
/// <param name="fromAgentID"></param>
|
||||||
public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
|
public void SimChat(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
|
||||||
LLUUID fromAgentID)
|
LLUUID fromID, bool fromAgent)
|
||||||
{
|
{
|
||||||
ChatFromViewerArgs args = new ChatFromViewerArgs();
|
SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
|
||||||
|
}
|
||||||
|
|
||||||
args.Message = Helpers.FieldToUTF8String(message);
|
/// <summary>
|
||||||
args.Channel = channel;
|
///
|
||||||
args.Type = type;
|
/// </summary>
|
||||||
args.Position = fromPos;
|
/// <param name="message"></param>
|
||||||
args.SenderUUID = fromAgentID;
|
/// <param name="type"></param>
|
||||||
args.Scene = this;
|
/// <param name="fromPos"></param>
|
||||||
|
/// <param name="fromName"></param>
|
||||||
ScenePresence user = GetScenePresence(fromAgentID);
|
/// <param name="fromAgentID"></param>
|
||||||
if (user != null)
|
public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, LLVector3 fromPos, string fromName,
|
||||||
args.Sender = user.ControllingClient;
|
LLUUID fromID, bool fromAgent)
|
||||||
else
|
{
|
||||||
args.Sender = null;
|
SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
|
||||||
|
|
||||||
args.From = fromName;
|
|
||||||
//args.
|
|
||||||
|
|
||||||
EventManager.TriggerOnChatFromWorld(this, args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -113,7 +113,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public IXfer XferManager;
|
public IXfer XferManager;
|
||||||
|
|
||||||
protected IHttpRequests m_httpRequestModule;
|
protected IHttpRequests m_httpRequestModule;
|
||||||
protected ISimChat m_simChatModule;
|
|
||||||
protected IXMLRPC m_xmlrpcModule;
|
protected IXMLRPC m_xmlrpcModule;
|
||||||
protected IWorldComm m_worldCommModule;
|
protected IWorldComm m_worldCommModule;
|
||||||
protected IAvatarFactory m_AvatarFactory;
|
protected IAvatarFactory m_AvatarFactory;
|
||||||
|
@ -637,7 +636,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetModuleInterfaces()
|
public void SetModuleInterfaces()
|
||||||
{
|
{
|
||||||
m_simChatModule = RequestModuleInterface<ISimChat>();
|
|
||||||
m_httpRequestModule = RequestModuleInterface<IHttpRequests>();
|
m_httpRequestModule = RequestModuleInterface<IHttpRequests>();
|
||||||
m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
|
m_xmlrpcModule = RequestModuleInterface<IXMLRPC>();
|
||||||
m_worldCommModule = RequestModuleInterface<IWorldComm>();
|
m_worldCommModule = RequestModuleInterface<IWorldComm>();
|
||||||
|
|
|
@ -285,6 +285,11 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
m_LSL_Functions.llShout(channelID, text);
|
m_LSL_Functions.llShout(channelID, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void llOwnerSay(string msg)
|
||||||
|
{
|
||||||
|
m_LSL_Functions.llOwnerSay(msg);
|
||||||
|
}
|
||||||
|
|
||||||
public void llRegionSay(int channelID, string text)
|
public void llRegionSay(int channelID, string text)
|
||||||
{
|
{
|
||||||
m_LSL_Functions.llRegionSay(channelID, text);
|
m_LSL_Functions.llRegionSay(channelID, text);
|
||||||
|
@ -1673,11 +1678,6 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
return m_LSL_Functions.llGetInventoryCreator(item);
|
return m_LSL_Functions.llGetInventoryCreator(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llOwnerSay(string msg)
|
|
||||||
{
|
|
||||||
m_LSL_Functions.llOwnerSay(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void llRequestSimulatorData(string simulator, int data)
|
public void llRequestSimulatorData(string simulator, int data)
|
||||||
{
|
{
|
||||||
m_LSL_Functions.llRequestSimulatorData(simulator, data);
|
m_LSL_Functions.llRequestSimulatorData(simulator, data);
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
|
public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface
|
||||||
{
|
{
|
||||||
// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
|
internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
|
||||||
internal SceneObjectPart m_host;
|
internal SceneObjectPart m_host;
|
||||||
|
@ -409,7 +409,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
|
wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
|
||||||
|
@ -419,7 +419,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
|
wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
|
||||||
|
@ -429,7 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
World.SimChat(Helpers.StringToField(text),
|
World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
|
wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);
|
||||||
|
@ -5478,15 +5478,13 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
public void llOwnerSay(string msg)
|
public void llOwnerSay(string msg)
|
||||||
{
|
{
|
||||||
//m_host.AddScriptLPS(1); // since we reuse llInstantMessage
|
m_host.AddScriptLPS(1);
|
||||||
//temp fix so that lsl wiki examples aren't annoying to use to test other functions
|
World.SimChatBroadcast(Helpers.StringToField(msg),
|
||||||
//should be similar to : llInstantMessage(llGetOwner(),msg)
|
ChatTypeEnum.Owner, 0, m_host.AbsolutePosition,
|
||||||
// llGetOwner ==> m_host.ObjectOwner.ToString()
|
m_host.Name, m_host.UUID, false);
|
||||||
llInstantMessage(m_host.ObjectOwner.ToString(),msg);
|
|
||||||
|
|
||||||
//World.SimChat(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
//IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
|
||||||
//wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llRequestSimulatorData(string simulator, int data)
|
public void llRequestSimulatorData(string simulator, int data)
|
||||||
|
|
|
@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
||||||
m_ScriptEngine.World.SimChat(Helpers.StringToField(text),
|
m_ScriptEngine.World.SimChat(Helpers.StringToField(text),
|
||||||
ChatTypeEnum.DebugChannel, 2147483647,
|
ChatTypeEnum.DebugChannel, 2147483647,
|
||||||
m_host.AbsolutePosition,
|
m_host.AbsolutePosition,
|
||||||
m_host.Name, m_host.UUID);
|
m_host.Name, m_host.UUID, false);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -140,8 +140,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
|
||||||
string text = "Error compiling script:\r\n" + e.Message.ToString();
|
string text = "Error compiling script:\r\n" + e.Message.ToString();
|
||||||
if (text.Length > 1500)
|
if (text.Length > 1500)
|
||||||
text = text.Substring(0, 1500);
|
text = text.Substring(0, 1500);
|
||||||
World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, m_host.AbsolutePosition,
|
World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647,
|
||||||
m_host.Name, m_host.UUID);
|
m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
}
|
}
|
||||||
catch (Exception e2) // LEGIT: User Scripting
|
catch (Exception e2) // LEGIT: User Scripting
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue