Skip to main content

Chat

Room chat flow:

User A (client) Server User B (client)
│ │ │
│── [1314] Talk("hello") ─>│ │
│ │ │
│ server calls room.talk()│ │
│ which iterates every │ │
│ Habbo in the room │ │
│ │── [1446] Talk ─────>│ (roomUnitId_A, "hello", bubble=0)
│ │ broadcast to B │ delivered to every other occupant
│ │ │
│<─ [1446] Talk ───────────│ │ (roomUnitId_A, "hello", bubble=0)
│ echo to sender A │ │ server includes A in the broadcast
│ (A is also in the room │ │ loop - sender hears own message
│ iterator; not special- │ │ exactly like everyone else)
│ cased) │ │

Why the sender gets an echo: room.talk() broadcasts [1446] RoomUserTalk to all current room occupants via a single loop - the sender is not excluded. The client uses the roomUnitId inside the packet to identify whose speech bubble to render, so it correctly shows the bubble above User A regardless of recipient.

C→S 1314 - RoomUserTalk

Nitro: UNIT_CHAT

Source: RoomUserTalkEvent, RoomChatMessage

Body:
message: string
styleId: int Bubble style ID (0 = default)

C→S 2085 - RoomUserShout

Nitro: UNIT_CHAT_SHOUT

Source: RoomUserShoutEvent, RoomChatMessage

Body:
message: string
styleId: int Bubble style ID (0 = default)

Same format as RoomUserTalk (1314).

C→S 1543 - RoomUserWhisper

Nitro: UNIT_CHAT_WHISPER

Source: RoomUserWhisperEvent, RoomChatMessage

Note: RoomUnitChatWhisper concatenates (recipientName + ' ' + message) into one string before sending - it does NOT send them as separate fields. Arcturus RoomChatMessage reconstructs them by splitting on the first space: data.split(" ")[0] = name, data.substring(name.length + 1) = message text. The doc previously listed 4 separate fields (targetName, message, emotion, styleId) - all wrong.

Body:
concatenated: string "recipientName message" as one string (name + space + message text)
styleId: int Bubble style ID

S→C 1446 - RoomUserTalk

Source: RoomUserTalkComposer, RoomUserTalkEvent

Broadcasts a chat message from a room user to all clients in the room, including the sender's room unit ID, message text, bubble style, and message length.

S→C 1036 - RoomUserShout

Nitro: UNIT_CHAT_SHOUT

Source: RoomUserShoutComposer, RoomUserShoutEvent

Broadcasts a shouted chat message from a room user to all clients in the room. Shares the same five-field body format as RoomUserTalk.

S→C 2704 - RoomUserWhisper

Source: RoomUserWhisperComposer, RoomUserWhisperEvent

All three share the same body format.

Body:
roomUnitId: int
message: string
bubbleType: int Chat bubble style (0 = default)
unknown: int (always 0)
textLength: int Length of message in characters

S→C 566 - Muted

Notifies the client that the user has been temporarily muted due to spamming, with the number of seconds remaining.

Body: (empty)