The existing g_admin prevents two users from having the same name, but neglects to use g_SanitiseName when performing the check. Thus, two users can have the same name if they have a different combination of leading/trailing spaces and color codes. These duplicate names are impossible to differentiate by anything but clientID and cause headaches for everyone, admins included.
This patch changes one single character of the code to fix the functionality. Is that some kind of record? Variable "name" held the un-sanitised name, while variable "name2" held the sanitised version. Thus, change the check from "name" to "name2" and we're good to go. The simplicity of the fix tells me that the current behavior is probably an overlooked bug more than an intended one.
Created attachment 1364 [details] Fixes the issue Only one character of code changed :)