Skip to content
  • 0 Unread 0
  • Recent
  • Popular
  • Users
  • Donate
Collapse

Plutonium

KL9

KL9

@KL9
Contributor
Unfollow Follow
About
Posts
3
Topics
1
Shares
0
Groups
1
Followers
14
Following
92

Posts

Recent Best Controversial

  • [T5] Plutonium Discord presence leaves ^< ^@ color codes in the server hostname
    KL9 KL9

    The Discord "now playing" rich presence strips ^0-^9, ^: and ^; from the server name, but passes the last five T5 color codes through literally: ^< ^= ^> ^? ^@.
    Any server whose name uses one of those shows the raw code on every connected player's Discord card. Including my server, which has orange ^<.

    Repro. Set sv_hostname to a string carrying one code of each class and read the card:

    sent:  PROBE ^1a ^:b ^<c ^=d ^>e ^?f ^@g ^;h END
    card:  PROBE a   b   ^<c ^=d ^>e ^?f ^@g h   END
    

    ^1, ^: and ^; are removed correctly. The other five survive verbatim. (Tested on a dedicated server with the value re-asserted, since it otherwise reverts to the server-key label within ~20s.)

    Cause. T5's colour table has 17 entries, so valid codes run '0' (0x30) through '@' (0x40). The game's own parser, at t5mp.exe file offset 0x14BC70, is index = char - '0' with a bound of 17 and a white fallback, with no digit check at all:

    8A 44 24 04    mov   al, [esp+4]     ; char after '^'
    2C 30          sub   al, 0x30        ; index = char - '0'
    3C 11          cmp   al, 0x11        ; 17 = table size
    0F B6 C0       movzx eax, al
    72 05          jb    use_it
    B8 07 00 00 00 mov   eax, 7          ; else white
    C3             ret
    

    The strip behaves as though its range is '0'-';' (0x30-0x3B), i.e. entries 0-11, while the table has five more: ^< orange, ^= steel blue, ^> light grey, ^? purple, ^@ brown. Widening the upper bound to '@' should be the whole fix.

    BO1 Server Hosting Support

  • Sign ups for Server-Owners channel - Discord
    KL9 KL9

    Discord: KL9
    Fry
    I run dedicated servers

    General Discussion
  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Unread 0
  • Recent
  • Popular
  • Users
  • Donate