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