====== S2C Packet 7.1: Context Message Add ====== Populates an existing message. This packet may occur before before [[sockchat:s2c:authz-success|S2C Packet 1.y: Authorization Success]] or [[sockchat:s2c:authz-fail|S2C Packet 1.n: Authorization Failure]] is received by the client in order to send an MOTD! ===== Format ===== ^ Index ^ Type ^ Description ^ | 0 | ''%%7%%'' | Context Population packet ID | | 1 | ''%%1%%'' | Context Message Add packet ID | | 2 | [[sockchat:types#timestamp|timestamp]] | Timestamp at which this message was received by the server | | 3 | [[sockchat:types#string|string]] | User ID of the author. ''%%-1%%'' indicates that the message was sent by the server itself and is a formatted [[sockchat:notices|notice]]. | | 4 | [[sockchat:types#user_name|user name]] | User name of the author of this message | | 5 | [[sockchat:types#colour|colour]] | Display colour of the author of this message | | 6 | [[sockchat:types#user_perms|user perms]] | Permissions for the author of this message. Might be empty for messages sent by ''%%-1%%'' | | 7 | [[sockchat:types#string|string]] | Message body. If this isn't an informational message, it is sanitised by the server: ''%%<%%'', ''%%>%%'' and ''%%\n%%'' are replaced by ''%%<%%'', ''%%>%%'' and ''%%\s
\s%%'' (where ''%%\s%%'' is a space/''%%0x20%%''). | | 8 | [[sockchat:types#string|string]] | Message ID | | 9 | [[sockchat:types#bool|bool]] | Whether this message should trigger notifications (sounds, banners, etc) on the client | | 10 | [[sockchat:types#message_flags|message flags]] | Message flags | ===== Examples ===== An MOTD message sent by the server, notice that the user permissions field is empty: 7\t1\t1744594219\t-1\tChatBot\tinherit\t\t0\fsay\fWelcome to Flashii Chat, flash!\twelcome\t0\t10010 A backlogged message sent by user with ID 73, with faulty user permissions formatting: 7\t1\t1744594187\t73\trjoken\t#f02d7d\t1 0 0 1 0\ttime to eep\t39991446535765\t0\t10010 A notice of a user with name Flashwave joining, again with empty user permissions field: 7\t1\t1744596795\t-1\tChatBot\tinherit\t\t0\fjoin\fFlashwave\t39992114020279\t0\t10010 A backlogged message sent by user with ID 3: 7\t1\t1744596494\t3\treemo\t#f02d7d\t1\f0\f0\f1\f0\twhere is my mile of fencing\t39992037008905\t0\t10010 ===== See Also ===== * [[sockchat:s2c:message-add|S2C Packet 2: Message Add]] - A message has been added to the message list. * [[sockchat:s2c:context-user-list|S2C Packet 7.0: Context User List]] - Provides the user list of the current channel. * [[sockchat:s2c:context-channel-list|S2C Packet 7.2: Context Channel List]] - Provides the channel list of the server.