3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

disallow squatting a registered channel name via RENAME

This commit is contained in:
Shivaram Lingamneni 2019-03-12 05:01:08 -04:00
parent 63029e2ff5
commit 8a11768c6a

View File

@ -218,7 +218,7 @@ func (cm *ChannelManager) Rename(name string, newname string) (err error) {
cm.Lock() cm.Lock()
defer cm.Unlock() defer cm.Unlock()
if cm.chans[cfnewname] != nil { if cm.chans[cfnewname] != nil || cm.registeredChannels[cfnewname] {
return errChannelNameInUse return errChannelNameInUse
} }
entry := cm.chans[cfname] entry := cm.chans[cfname]