1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
use ;
/// # ChatFromSimulator
/// <https://wiki.secondlife.com/wiki/ChatFromSimulator>
///
/// The chat packet sent from the simulator to the viewer. Contains data about chat messages being
/// sent in the world.
///
/// ## Header
/// | ChatFromSimulator |||||
/// |--------------|---------------|----------------|-------------------|---------------------|
/// | Packet Header| id:139 | reliable: false| zerocoded: false | frequency: Low |
///
/// ## Packet Structure
/// | ChatData | | | |
/// |---------------|---------|-------------|-----------------------------------------------------|
/// | FromName |variable bytes (null terminated) | [String] | Name of user that sent the chat|
/// | SourceID |16 bytes | [Uuid](uuid::Uuid) | Agent ID of the user who sent the chat |
/// | OwnerID |16 bytes | [Uuid](uuid::Uuid) | Undocumented |
/// | SourceType |1 byte | [u8]| The type of thing that emitted the chat. (system, agent or object)|
/// | ChatType |1 byte | [u8]| type of chat, like "say", "whisper" and "yell" |
/// | Audible |1 byte | [u8]| If the message is audible or not |
/// | Position |12 bytes | [Vector3](glam::Vec3)[[u8]] | The position of the message. Unused |
/// | Message |variable bytes (null terminated) | [String] | Contents of chat message |
/// # ChatFromViewer
/// <https://wiki.secondlife.com/wiki/ChatFromViewer>
///
/// The chat packet sent from the viewer to the server
///
/// ## Header
/// | ChatFromViewer |||||
/// |--------------|---------------|----------------|-------------------|---------------------|
/// | Packet Header| id:80 | reliable: true | zerocoded: false | frequency: Low |
///
/// ## Packet Structure
/// | ChatData | | | |
/// |---------------|----------|-------------|-----------------------------------------------------|
/// | AgentID | 16 bytes | [Uuid](uuid::Uuid)| the ID of your agent |
/// | SessionID | 16 bytes | [Uuid](uuid::Uuid)| The ID of your session |
/// | Message | variable bytes (null terminated) | [String] | Chat message sent from user |
/// | Type | 1 byte | [u8] | Type of chat, like "say", "whisper" and "yell" |
/// | Channel | 4 bytes | [i32] | Channel to send the message on. |
/// The type of chats that can be sent