[Bug report] Tab list rank color

Discussion in 'Help & Support / Errors & Bugs' started by 314, Dec 31, 2017.

  1. 314

    314 Irratioπal President, former ServerAdmin
    President ⛰️⛰️ Ex-President ⚒️⚒️ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    6,963
    Trophy Points:
    87,660
    EcoDollars:
    $27,000,000
    Ratings:
    +4,866
    Summary/introduction
    A few days ago I realized that the tab list's rank entry (first row, second column) displayed as "Rank: ServerAdmin". This confused me because I was absolutely sure that it used to be "Rank: GameAdmin" before, i.e. using the proper rank colors. Other staff members told me that their rank was orange as well, but poke confirmed that the GA rank display does indeed use rank colors.

    Evidence
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    (Special thanks to everyone who provided those screenshots, and to @MadMonster_ for helping me collect them.)

    Potential cause
    I have a theory about why this happens, but I decided to place it in a spoiler tag because it uses a lot of [CODE] blocks.
    I assume ECC's ranks use the following color code formatting for its rank tags:
    Code:
    §f[Builder]
    §a[Resident]
    §2[Mayor]
    §6[President]
    §6[T§2y§6c§2o§6o§2n§6]
    §6[§a$§bEcoLeader§a$§6]
    §6[§a$$§3E§bc§3o§bM§3a§bs§3t§be§3r§a$$§6]
    §6[§a$$$§3EcoLegend§a$$$§6]
    §3[Moderator]
    §c[SuperMod]
    §c[§4G§came§4A§cdmin]
    §4[ServerAdmin]
    
    I suspect that the tab list plugin uses the content of the [Rank] tags and inserts them into a specific format:
    Code:
    §cRank: §6bracket_content
    
    Assuming that the plugin grabs everything within the braces, this is the content it would find:
    Code:
    §f[Builder]
    §a[Resident]
    §2[Mayor]
    §6[President]
    §6[T§2y§6c§2o§6o§2n§6]
    §6[§a$§bEcoLeader§a$§6]
    §6[§a$$§3E§bc§3o§bM§3a§bs§3t§be§3r§a$$§6]
    §6[§a$$$§3EcoLegend§a$$$§6]
    §3[Moderator]
    §c[SuperMod]
    §c[§4G§came§4A§cdmin]
    §4[ServerAdmin]
    
    Which then translates to the following ranks when inserted into the tab list's format:
    Code:
    §cRank: §6Builder
    §cRank: §6Resident
    §cRank: §6Mayor
    §cRank: §6President
    §cRank: §6T§2y§6c§2o§6o§2n§6
    §cRank: §6§a$§bEcoLeader§a$§6
    §cRank: §6§a$$§3E§bc§3o§bM§3a§bs§3t§be§3r§a$$§6
    §cRank: §6§a$$$§3EcoLegend§a$$$§6
    §cRank: §6Moderator
    §cRank: §6SuperMod
    §cRank: §6§4G§came§4A§cdmin
    §cRank: §6ServerAdmin
    
    The final result without color codes for increased readability:
    Code:
    Rank: Builder
    Rank: Resident
    Rank: Mayor
    Rank: President
    Rank: Tycoon
    Rank: $EcoLeader$
    Rank: $$EcoMaster$$
    Rank: $$$EcoLegend$$$
    Rank: Moderator
    Rank: SuperMod
    Rank: GameAdmin
    Rank: ServerAdmin
    
    As we can see, this perfectly matches the screenshots.

    I assume that changing the default rank color from orange to (e.g.) §5 would affect the Builder-President (and staff) ranks as well as the Tycoon rank because the T's color tag is most likely located outside of the brace (§6[T)and therefore excluded.

    Suggested solutions
    1. Strip all color codes from the rank before displaying it and show all ranks in orange.
    Disadvantage: Custom modification, looks terrible.

    2. Modify the BTLP plugin to exclude brackets, but not their color prefix.
    Code:
    §f[Builder]
    §a[Resident]
    §2[Mayor]
    §6[President]
    §6[T§2y§6c§2o§6o§2n§6]
    §6[§a$§bEcoLeader§a$§6]
    §6[§a$$§3E§bc§3o§bM§3a§bs§3t§be§3r§a$$§6]
    §6[§a$$$§3EcoLegend§a$$$§6]
    §3[Moderator]
    §c[SuperMod]
    §c[§4G§came§4A§cdmin]
    §4[ServerAdmin]
    
    Disadvantage: Custom modification.

    3. Preferred solution: Modify the rank config to include duplicate color codes after the bracket.
    Code:
    §f[§fBuilder]
    §a[§aResident]
    §2[§2Mayor]
    §6[§6President]
    §6[§6T§2y§6c§2o§6o§2n§6]
    §6[§a$§bEcoLeader§a$§6]
    §6[§a$$§3E§bc§3o§bM§3a§bs§3t§be§3r§a$$§6]
    §6[§a$$$§3EcoLegend§a$$$§6]
    §3[§3Moderator]
    §c[§cSuperMod]
    §c[§4G§came§4A§cdmin]
    §4[§4ServerAdmin]
    
     
    • Like Like x 3
    • Informative Informative x 1
    • List
  2. JamieSinn

    JamieSinn Retired Lead Administrator/Developer
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jun 4, 2011
    Messages:
    5,517
    Trophy Points:
    78,090
    Gender:
    Male
    Ratings:
    +4,588
    Some ranks in the name are colour coded, use manwhois to confirm. Btlp happens to use the name and parse it
     
  3. Nicit6

    Nicit6 N6
    Mayor ⛰️⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ II ⭐ Gameplay Architect Premium Upgrade

    Joined:
    Jul 13, 2013
    Messages:
    9,914
    Trophy Points:
    102,160
    Ratings:
    +8,058
    Thats exactly it. SA used to display as red when it had the &4 in the group name but when Andrew redid perms a while back he changed the group name and it's orange.

    tl;dr @314 not a bug for once
     
    #3 Nicit6, Dec 31, 2017
    Last edited: Dec 31, 2017
  4. 314

    314 Irratioπal President, former ServerAdmin
    President ⛰️⛰️ Ex-President ⚒️⚒️ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    6,963
    Trophy Points:
    87,660
    EcoDollars:
    $27,000,000
    Ratings:
    +4,866
    I actually forgot about that one, but I remember now. So it's basically what I suspected.
    I would expect that either all or no ranks use their proper colors, but not exclusively Tycoon+ and GA. I'd count it as a bug, that's why I decided to file this report in the first place.

    ...okay, okay, I see your point. Should I convert this thread to a suggestion and move it?
     
  5. Nicit6

    Nicit6 N6
    Mayor ⛰️⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ II ⭐ Gameplay Architect Premium Upgrade

    Joined:
    Jul 13, 2013
    Messages:
    9,914
    Trophy Points:
    102,160
    Ratings:
    +8,058
    I mean you could but tbh it's too trivial of a thing to bother with imo
     
  6. lambiser

    lambiser Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Jun 4, 2017
    Messages:
    858
    Trophy Points:
    13,590
    Gender:
    Female
    Ratings:
    +906
    Where even is this stuff?
     
  7. andrewkm

    Founder Premium Upgrade

    Joined:
    Apr 5, 2011
    Messages:
    20,370
    Trophy Points:
    102,160
    Ratings:
    +15,065
    Moderators and Supermods show up as the correct color for me @314