Match RCON player pings by unique name when GUIDs differ
This commit is contained in:
@@ -154,6 +154,20 @@ describe('parsePlayerRoster', () => {
|
||||
expect(roster[0].name).toBe('Jenny Two Names');
|
||||
});
|
||||
|
||||
it('parses T6 status with bot column and right-aligned hexadecimal GUIDs', () => {
|
||||
const body = [
|
||||
'map: zm_transit',
|
||||
'num score bot ping guid name lastmsg address qport rate',
|
||||
'--- ----- --- ---- -------------------------------- ---------------- ------- --------------------- ------ -----',
|
||||
' 0 940 0 91 6C4C20 EyelessGreem 50 192.0.2.137:4976 40123 20000',
|
||||
' 1 150 0 151 6C45DD _frxn.3 50 198.51.100.1:4976 8140 20000'
|
||||
].join('\n');
|
||||
expect(parsePlayerRoster(body)).toEqual([
|
||||
{ num: 0, score: 940, ping: 91, guid: '6C4C20', name: 'EyelessGreem' },
|
||||
{ num: 1, score: 150, ping: 151, guid: '6C45DD', name: '_frxn.3' }
|
||||
]);
|
||||
});
|
||||
|
||||
it('strips color codes from statusResponse-dialect names too', () => {
|
||||
const body = [
|
||||
'statusResponse',
|
||||
|
||||
Reference in New Issue
Block a user