Bug 4805 - namelog can be wrong or missing depending on order of renames
Status: RESOLVED FIXED
Alias: None
Product: Tremulous
Classification: Unclassified
Component: Admin system
Version: SVN HEAD
Hardware: All All
: P3 normal
Assignee: Tony J. White
QA Contact: Tremulous Bugs
URL:
Depends on:
Blocks:
 
Reported: 2010-11-28 18:03 EST by John 'Rezyn' Ellis
Modified: 2010-12-05 23:02:33 EST
1 user (show)

See Also:


Attachments
Proposed patch (4.12 KB, patch)
2010-11-28 19:29 EST, John 'Rezyn' Ellis

Description John 'Rezyn' Ellis 2010-11-28 18:03:52 EST
By renaming several times without changing their effective sanitized name, a player can make their name not appear in buildlog and namelog searches.

Example:
broadcast: print "third entered the game
ClientBegin: 0
]namelog
0  127.0.0.3 'third'
namelog: 1 recent clients found
ClientRename: 0 [127.0.0.3] (XX) "third" -> "third" "third"
]namelog
0  127.0.0.3 'third'
namelog: 1 recent clients found
ClientRename: 0 [127.0.0.3] (X) "third" -> "fourth" "fourth"
]namelog
0  127.0.0.3 'third'
namelog: 1 recent clients found
]namelog fourth
namelog: 0 recent clients found
]
Comment 1 John 'Rezyn' Ellis 2010-11-28 19:29:00 EST
Created attachment 2494 [details]
Proposed patch

This patch fixes the problems by using a separate counter to keep track of the last used name. It also fixes loss of namelog information when a player is renamed by an admin.

Additionally I took the liberty of adding an asterisk next to the current name in the namelog listing.
Comment 2 Chris "Lakitu7" Schwarz 2010-12-05 15:08:52 EST
Looks good to me. Go for it.
Comment 3 John 'Rezyn' Ellis 2010-12-05 23:02:33 EST
committed and fixed in r2070