3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +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()
defer cm.Unlock()
if cm.chans[cfnewname] != nil {
if cm.chans[cfnewname] != nil || cm.registeredChannels[cfnewname] {
return errChannelNameInUse
}
entry := cm.chans[cfname]