Make it possible to customize the super user name

This commit is contained in:
Ola Bini 2020-07-11 15:52:35 +00:00
parent dd4cf8748f
commit c876ee6273
No known key found for this signature in database
GPG key ID: 6786A150F6A2B28F
3 changed files with 24 additions and 12 deletions

View file

@ -141,9 +141,9 @@ func (client *Client) UserId() int {
}
// ShownName gets the client's shown name.
func (client *Client) ShownName() string {
func (client *Client) ShownName(suName string) string {
if client.IsSuperUser() {
return "SuperUser"
return suName
}
if client.IsRegistered() {
return client.user.Name