Railgun

if it ain't broke, we'll break it

User Tools

Site Tools


sockchat:commands:afk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sockchat:commands:afk [2025/04/14 12:29] – created flashsockchat:commands:afk [2025/04/14 21:05] (current) – ugc flash
Line 5: Line 5:
  
 Running this command will also update their user name by prepending a status message to it. Running this command will also update their user name by prepending a status message to it.
-This status message can be provided by appending an argument to the command, is to be converted to uppercase and can be up to five characters long with any additional characters being removed.+This status message can be provided by appending an argument to the command, is to be converted to uppercase and can be up to 5 unicode grapheme clusters or 50 bytes long with any additional data truncated.
 The status message is prepended with ''%%<%%'' and suffixed with ''%%>_%%''. The status message is prepended with ''%%<%%'' and suffixed with ''%%>_%%''.
 If no status message argument is provided, the string ''%%AFK%%'' will be used, resulting in a prefix of ''%%<AFK>_%%''. If no status message argument is provided, the string ''%%AFK%%'' will be used, resulting in a prefix of ''%%<AFK>_%%''.
Line 13: Line 13:
   /afk [message?]   /afk [message?]
  
 +  * ''%%[message?]%%'' is an optional [[sockchat:types#string|string]] argument that can be used to specify a reason for being away.
 ===== Examples ===== ===== Examples =====
 +
 +==== Without a message argument ====
  
 If a user named kp with user ID 248 runs the following command: If a user named kp with user ID 248 runs the following command:
Line 19: Line 22:
   /afk   /afk
  
-It will update their display name to ''%%<AFK>_kp%%'' and result in the following sequence of packets being broadcast to all other clients present in the same channel:+It will update their display name to ''%%<AFK>_kp%%'' and result in the following sequence of packets being broadcast to all clients present in the same channel:
  
   10\t248\t<AFK>_kp\tinherit\t1\f0\f0\f0\f0   10\t248\t<AFK>_kp\tinherit\t1\f0\f0\f0\f0
 +
 +==== With a message argument ====
 +
 +If a user named Sword with user ID 100 runs the following command:
 +
 +  /afk Gaming
 +
 +The argument will be truncated and uppercased to ''%%GAMIN%%'', their display name will be updated to ''%%<GAMIN>_Sword%%'' and have the following sequence of packets sent to all clients present in the same channel. Featuring faulty user permissions string:
 +
 +  10\t100\t<GAMIN>_Sword\tinherit\t1 0 0 0 0
 +
 +===== Remarks =====
 +
 +  * When combined with a nickname set through the [[sockchat:commands:nick|/nick]] command, the AFK prefix will come BEFORE the nickname prefix. Example: ''%%<AFK>_~nickname%%''.
 +  * Maximum length of the status message might be implementation defined.
  
 ===== See Also ===== ===== See Also =====
sockchat/commands/afk.1744633746.txt.gz · Last modified: 2025/04/14 12:29 by flash