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