Skip to content

Commit 4fe4374

Browse files
committed
main: /rename should not complain when symbol is set and name is unchanged
1 parent 7461ca8 commit 4fe4374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

host.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,9 @@ func (h *Host) InitCommands(c *chat.Commands) {
669669

670670
oldID := member.ID()
671671
newID := sanitize.Name(args[1])
672-
if newID == oldID {
672+
if newID == oldID && !symbolSet {
673673
return errors.New("new name is the same as the original")
674-
} else if newID == "" && symbolSet {
674+
} else if (newID == "" || newID == oldID) && symbolSet {
675675
if member.User.OnChange != nil {
676676
member.User.OnChange()
677677
}

0 commit comments

Comments
 (0)