mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
* Major structural change: Begun converting Events to use (caller, args) syntax to conform with .NET guidelines.
* OnChatFromViewer has been converted as an example. * Bug: SimpleApp's NPC client does not implement a Scene property and will likely crash with a NullReferenceException when it attempts to chat.
This commit is contained in:
@@ -119,13 +119,12 @@ namespace OpenSim.Region.Environment.Modules
|
||||
client.OnChatFromViewer += DeliverClientMessage;
|
||||
}
|
||||
|
||||
private void DeliverClientMessage(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName,
|
||||
LLUUID fromAgentID)
|
||||
private void DeliverClientMessage(Object sender, ChatFromViewerArgs e)
|
||||
{
|
||||
ASCIIEncoding ae = new ASCIIEncoding();
|
||||
|
||||
DeliverMessage(fromAgentID.ToString(), type, channel, fromName, ae.GetString(message));
|
||||
|
||||
DeliverMessage(e.Sender.AgentId.ToString(),
|
||||
(int)e.Type, e.Channel,
|
||||
e.Sender.FirstName + " " + e.Sender.LastName,
|
||||
e.Message);
|
||||
}
|
||||
|
||||
public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg)
|
||||
|
||||
Reference in New Issue
Block a user