main: /rename should not complain when symbol is set and name is unchanged

This commit is contained in:
Andrey Petrov committed 2020-08-03 14:13:51 -04:00
1 parent 7461ca8e39
commit 4fe43746fe
1 file changed
+2 -2
+2 -2
View File
@@ -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()
}