OpenMetaverse.AgentManager.Chat C# (CSharp) Method

Chat() public method

Send a chat message
public Chat ( string message, int channel, ChatType type ) : void
message string The Message you're sending out.
channel int Channel number (0 would be default 'Say' message, other numbers /// denote the equivalent of /# in normal client).
type ChatType Chat Type, see above.
return void
        public void Chat(string message, int channel, ChatType type)
        {
            ChatFromViewerPacket chat = new ChatFromViewerPacket();
            chat.AgentData.AgentID = this.id;
            chat.AgentData.SessionID = Client.Self.SessionID;
            chat.ChatData.Channel = channel;
            chat.ChatData.Message = Utils.StringToBytes(message);
            chat.ChatData.Type = (byte)type;

            Client.Network.SendPacket(chat);
        }