mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
some changes needed i wanted later if ever.. well..
This commit is contained in:
@@ -50,18 +50,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name='targetID'></param>
|
||||
/// <param name='fromAgent'></param>
|
||||
/// <param name='broadcast'></param>
|
||||
public void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
public void SimChat(string message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, UUID targetID, bool fromAgent, bool broadcast)
|
||||
{
|
||||
OSChatMessage args = new OSChatMessage();
|
||||
|
||||
args.Message = Utils.BytesToString(message);
|
||||
args.Channel = channel;
|
||||
args.Type = type;
|
||||
args.Position = fromPos;
|
||||
args.SenderUUID = fromID;
|
||||
args.Scene = this;
|
||||
args.Destination = targetID;
|
||||
OSChatMessage args = new OSChatMessage
|
||||
{
|
||||
Message = message,
|
||||
Channel = channel,
|
||||
Type = type,
|
||||
Position = fromPos,
|
||||
SenderUUID = fromID,
|
||||
Scene = this,
|
||||
Destination = targetID,
|
||||
From = fromName
|
||||
};
|
||||
|
||||
if (fromAgent)
|
||||
{
|
||||
@@ -75,12 +77,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
args.SenderObject = obj;
|
||||
}
|
||||
|
||||
args.From = fromName;
|
||||
//args.
|
||||
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE]: Sending message {0} on channel {1}, type {2} from {3}, broadcast {4}",
|
||||
// args.Message.Replace("\n", "\\n"), args.Channel, args.Type, fromName, broadcast);
|
||||
//m_log.DebugFormat(
|
||||
// "[SCENE]: Sending message {0} on channel {1}, type {2} from {3}, broadcast {4}",
|
||||
// args.Message.Replace("\n", "\\n"), args.Channel, args.Type, fromName, broadcast);
|
||||
|
||||
if (broadcast)
|
||||
EventManager.TriggerOnChatBroadcast(this, args);
|
||||
@@ -90,6 +89,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, bool fromAgent, bool broadcast)
|
||||
{
|
||||
SimChat(Utils.BytesToString(message), type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, broadcast);
|
||||
}
|
||||
|
||||
protected void SimChat(string message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, bool fromAgent, bool broadcast)
|
||||
{
|
||||
SimChat(message, type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, broadcast);
|
||||
}
|
||||
@@ -105,17 +110,23 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, false);
|
||||
SimChat(Utils.BytesToString(message), type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, false);
|
||||
}
|
||||
|
||||
public void SimChat(string message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(message, type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, false);
|
||||
}
|
||||
|
||||
public void SimChat(string message, ChatTypeEnum type, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(Utils.StringToBytes(message), type, 0, fromPos, fromName, fromID, fromAgent);
|
||||
SimChat(message, type, 0, fromPos, fromName, fromID, UUID.Zero, fromAgent, false);
|
||||
}
|
||||
|
||||
public void SimChat(string message, string fromName)
|
||||
{
|
||||
SimChat(message, ChatTypeEnum.Broadcast, Vector3.Zero, fromName, UUID.Zero, false);
|
||||
SimChat(message, ChatTypeEnum.Broadcast, 0, Vector3.Zero, fromName, UUID.Zero, UUID.Zero, false, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -126,10 +137,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="fromPos"></param>
|
||||
/// <param name="fromName"></param>
|
||||
/// <param name="fromAgentID"></param>
|
||||
public void SimChatBroadcast(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
public void SimChatBroadcast(string message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName,
|
||||
UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true);
|
||||
SimChat(message, type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -143,6 +154,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="fromAgentID"></param>
|
||||
/// <param name="targetID"></param>
|
||||
public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(Utils.BytesToString(message), ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||
}
|
||||
|
||||
public void SimChatToAgent(UUID targetID, string message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
|
||||
{
|
||||
SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user