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:
parent
63029e2ff5
commit
8a11768c6a
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user