MantisBT - Doomseeker
View Issue Details
0003193Doomseeker[All Projects] Bugpublic2017-07-21 23:532018-03-04 12:23
0003193: Buddies: "\c[" is not a "valid" standard color sequence (was: Server owner does not show up in buddies list)
Extended colors from third-party "NewTextColors_260.pk3" (for Doom) are not recognized/escaped correctly in the Buddies interface of Doomseeker.

(Original description below)

The owner of a server, when plaing on his own server, does not show up in buddies list. All other buddies on same server do. I had the owner change his name, added the new name in the buddies list, and he still didn't show up. I found another server with presumably a local player (ping 1) but after adding him he does show up, so I don't know what's going on.
See comment 0018437

(Original steps to reproduce below)

Add "Johnny Blaze" to your buddies list, when he's playing in one of the "MOP + Chillax" servers (usually fri/sat around midnight GMT, sometimes other times too)
Relevant info on NewTextColors: [^]
No tags attached.
Issue History
2017-07-21 23:53Zom-BNew Issue
2017-07-22 16:38ZalewaNote Added: 0018075
2017-07-29 20:01Zom-BNote Added: 0018117
2017-10-04 20:13WubTheCaptainNote Added: 0018435
2017-10-04 20:26WubTheCaptainNote Added: 0018436
2017-10-04 20:26WubTheCaptainNote Edited: 0018436bug_revision_view_page.php?rev_id=11045
2017-10-04 20:33WubTheCaptainNote Edited: 0018436bug_revision_view_page.php?rev_id=11046
2017-10-04 20:52WubTheCaptainNote Deleted: 0018436
2017-10-04 20:59WubTheCaptainNote Added: 0018437
2017-10-04 21:00WubTheCaptainNote Edited: 0018437bug_revision_view_page.php?bugnote_id=18437#r11048
2017-10-04 21:01WubTheCaptainNote Edited: 0018437bug_revision_view_page.php?bugnote_id=18437#r11049
2017-10-04 21:08WubTheCaptainStatusnew => acknowledged
2017-10-04 21:09WubTheCaptainNote Edited: 0018437bug_revision_view_page.php?bugnote_id=18437#r11050
2017-10-04 21:10WubTheCaptainNote Edited: 0018437bug_revision_view_page.php?bugnote_id=18437#r11051
2017-10-04 21:10WubTheCaptainProduct Version => 1.1
2017-10-04 21:31WubTheCaptainNote Edited: 0018437bug_revision_view_page.php?bugnote_id=18437#r11052
2017-10-04 21:58WubTheCaptainNote Added: 0018438
2017-10-05 00:36Blzut3Note Added: 0018442
2018-02-19 22:20WubTheCaptainStatusacknowledged => confirmed
2018-02-19 22:21WubTheCaptainSummaryServer owner does not show up in buddies list => Buddies: "\c[" is not a "valid" standard color sequence (was: Server owner does not show up in buddies list)
2018-02-19 22:24WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11411#r11411
2018-02-19 22:24WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11412#r11412
2018-02-19 22:24WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11413#r11413
2018-02-19 22:25WubTheCaptainSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11414#r11414
2018-02-19 22:26WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11416#r11416
2018-02-19 22:29WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=11417#r11417
2018-02-20 09:29ZalewaNote Added: 0019077
2018-02-20 09:30ZalewaNote Edited: 0019077bug_revision_view_page.php?bugnote_id=19077#r11421
2018-02-21 07:36ZalewaAssigned To => Zalewa
2018-02-21 07:36ZalewaStatusconfirmed => assigned
2018-02-21 07:40ZalewaAdditional Information Updatedbug_revision_view_page.php?rev_id=11428#r11428
2018-03-03 20:41ZalewaNote Added: 0019116
2018-03-03 20:41ZalewaStatusassigned => needs testing
2018-03-03 21:16WubTheCaptainNote Added: 0019121
2018-03-03 21:16WubTheCaptainStatusneeds testing => assigned
2018-03-03 21:17WubTheCaptainNote Edited: 0019121bug_revision_view_page.php?bugnote_id=19121#r11472
2018-03-03 21:20ZalewaNote Added: 0019122
2018-03-03 21:20ZalewaStatusassigned => needs testing
2018-03-03 21:47WubTheCaptainTarget Version => 1.2
2018-03-04 10:53WubTheCaptainNote Added: 0019131
2018-03-04 11:31WubTheCaptainNote Added: 0019132
2018-03-04 11:40WubTheCaptainNote Added: 0019133
2018-03-04 11:41WubTheCaptainStatusneeds testing => resolved
2018-03-04 11:41WubTheCaptainFixed in Version => 1.2
2018-03-04 11:41WubTheCaptainResolutionopen => fixed
2018-03-04 12:23WubTheCaptainNote Added: 0019134

2017-07-22 16:38   
Doomseeker doesn't know if player is local or not (in fact, all players in Zandronum are technically remote, because the servers can only be run in a dedicated mode).

Maybe "Johnny Blaze" is using a hidden character in their nickname? Something that is there but isn't printed on screen.

Try adding this player in "Basic" mode as "*Johnny*Blaze*".
2017-07-29 20:01   
He shows up as "b1]Johnny Blaze". It's not stripping this extended color code quite right for some reason.
2017-10-04 20:13   
I'm unable to reproduce. I tried names with colors, spaces, basic wildcard matching, they all show up in the buddy list as intended.

Only thing I noticed was at some point Doomseeker's buddy list for names I had added just reset. This happens sometimes when a server started from Doomseeker is open and Doomseeker is restarted.
2017-10-04 20:59   
(edited on: 2017-10-04 21:31)
Okay, I think I understand what's going on in here. It's an escape sequence/third-party issue. This affects extended colors from third-party "NewTextColors_260.pk3", but not regular color sequences.

Ingame, I had my name set to "b1]Wub". Just those characters, no colors. "name b1]Wub" in console. Attempting to match "b1]*" in Doomseeker finds no results. Attempting to match "*Wub" finds it. An escaped sequence "b1\]*" also finds it.

With standard colors: "name \cfWub" in console. This is displayed as "Wub" with a color in the "server details" dialog in Doomseeker, but as "Wub" in the buddies dialog. It uses a standard color ingame. "Wub" matches this in buddy list.

With extended colors from NewTextColors_260.pk3: "name \c[b1]Wub" in console. This is displayed as "Wub" with no colors in the "server details" dialog in Doomseeker, but as "b1]Wub" in buddies dialog. It uses an extended color ingame. "Wub" does not match this in buddy list, but "*Wub" does. "b1]Wub" or "b1\]Wub" does not match. "\[b1\]Wub" matches.

I also tried using a non-breaking space (" ") as a "hidden character". To my awareness, it's treated the same as a regular space character (like case-insensitive).

In other words: Because "\c[" is not a "valid" standard color sequence ("[" is not a recognized color), it will be discarded and you get this result. Special characters must also be escaped with a backwards slash ("\") or matched with a wildcard asterisk ("*").

Tested with Zandronum 3.0 and Doomseeker 1.1.

2017-10-04 21:58   
Personally, I also think Doomseeker to be working as intended. If game data (WAD) authors want to break existing conventions, that's their fault. I admit I'd like to have a color sequence standardized for custom colors, but until then I wouldn't make a hacked up patch to this issue. The correct way to handle those broken convention cases is to match "*Wub".

I've set this to acknowledged, but not confirmed. I'll leave it up to the developers (Zalewa and/or Blzut3) to decide what to do with this.
2017-10-05 00:36   
The "\c[*]" is a valid color sequence for a long time now, so if that's what's tripping things up then this is a bug.
2018-02-20 09:29   
(edited on: 2018-02-20 09:30)
Wub, thanks for clarifying this further. I'll have a look at this sometime this week.

2018-03-03 20:41   
Should be fixed: [^]
2018-03-03 21:16   
(edited on: 2018-03-03 21:17)
Quote from src/core/serverapi/player.cpp:L101
// Lets only remove the following character on \c.

This old comment is now outdated (and slightly misleading). Please update it.

Quote from src/core/serverapi/player.cpp:L105
int colorCodeIdx = i + 1;

Could condense this to int colorCodeIdx = i++, but meh.

2018-03-03 21:20   
Comments amended: [^]
2018-03-04 10:53   
Rant: This one is quite difficult to test, because the buddies list is not updated every time the specific server is refreshed, a new nickname is added or deleted. I get confused a lot (like previously in this ticket) when something matches, then the other time it seemingly doesn't. Cornercases are difficult or time consuming to test because of this seperate issue. As a workaround I sometimes resort to restarting Doomseeker often, but that may also lead to master server response throttling.

"name \c[b1]Wub" ingame matches to "Wub" in Doomseeker buddies now in 1.2.
2018-03-04 11:31   
Doomseeker 1.1 and 1.2~beta-1 both discard brackets in basic pattern type silently.

"name b1]Wub" ingame has these basic search results:

  • The name is displayed as b1]Wub in 1.1 and 1.2 in Doomseeker buddies list.
  • b1* matches in 1.1 and 1.2.
  • *Wub matches in 1.1 and 1.2.
  • Wub doesn't match in 1.1 and 1.2.
  • b1\]Wub doesn't match with basic pattern type, but matches with advanced pattern type in 1.1 and 1.2.
  • b1]Wub doesn't match and is not saved to configuration, thus lost before next launch of Doomseeker. (Rejected by advanced pattern type as invalid regex, but not rejected by basic.)

"name \c[b1]Wubeeeeeeeeeeeeeeeeeeeeeee" is the max length I could do.

]name b1]Wubeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
b1]Wub is now known as b1]Wubeeeeeeeeeeeeeeeeeeeeeee

(This is misleading: The \c[ part was stripped from stdout by Zandronum?)

  • The name is displayed as b1]Wubeeeeeeeeeeeeeeeeeeeeeee in 1.1 and as Wubeeeeeeeeeeeeeeeeeeeeeee in 1.2 in Doomseeker buddies list.
  • b1* matches in 1.1, doesn't match in 1.2.
  • *Wubeeeeeeeeeeeeeeeeeeeeeee matches in 1.1 and 1.2.
  • Wubeeeeeeeeeeeeeeeeeeeeeee doesn't match in 1.1, matches in 1.2.
  • b1\]Wubeeeeeeeeeeeeeeeeeeeeeee matches with 1.1, and doesn't match in 1.2 with advanced pattern type.
  • b1]Wubeeeeeeeeeeeeeeeeeeeeeee is again silently dropped in 1.1 and 1.2, and rejected by advanced pattern type as invalid regex.

I think this is resolved.
2018-03-04 11:40   
Also worth noting something garbage like "name \c\c[]Wub" will result in ingame name of "[]Wub", which the basic pattern type will never find with "[]Wub" (due to "[]Wub" still showing in buddies match list, but silently discarded on next launch) but advanced pattern type "\[\]Wub" will match. Anyway, this is a seperate concern and not necessarily an issue...
2018-03-04 12:23   
Note: Confusion in this ticket was created mainly by issues 0003398 and 0003399.