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

Plutonium

  1. Home
  2. BO1 Server Hosting Support
  3. [T5] Plutonium Discord presence leaves ^< ^@ color codes in the server hostname

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

Scheduled Pinned Locked Moved BO1 Server Hosting Support
2 Posts 2 Posters 19 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • KL9 Online
    KL9 Online
    KL9
    Contributor
    wrote last edited by
    #1

    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.

    1 Reply Last reply
    0
    • Resxt Offline
      Resxt Offline
      Resxt
      Plutonium Staff
      wrote last edited by
      #2

      Open an issue here
      https://github.com/plutoniummod/issue-tracker/issues

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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