mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 15:17:16 +03:00
main: /rename should not complain when symbol is set and name is unchanged
This commit is contained in:
parent
7461ca8e39
commit
4fe43746fe
4
host.go
4
host.go
@ -669,9 +669,9 @@ func (h *Host) InitCommands(c *chat.Commands) {
|
||||
|
||||
oldID := member.ID()
|
||||
newID := sanitize.Name(args[1])
|
||||
if newID == oldID {
|
||||
if newID == oldID && !symbolSet {
|
||||
return errors.New("new name is the same as the original")
|
||||
} else if newID == "" && symbolSet {
|
||||
} else if (newID == "" || newID == oldID) && symbolSet {
|
||||
if member.User.OnChange != nil {
|
||||
member.User.OnChange()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user