mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-10-25 01:06:20 +03:00
main: /rename should not complain when symbol is set and name is unchanged
This commit is contained in:
1 parent
7461ca8e39
commit
4fe43746fe
1 file changed
+2
-2
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user