1
0
Fork 0
forked from External/ergo

fix #328 (implement DEFCON)

This commit is contained in:
Shivaram Lingamneni 2020-07-08 05:32:14 -04:00
parent f2d0842453
commit 6ea2eb367d
11 changed files with 70 additions and 7 deletions

View file

@ -187,6 +187,10 @@ func (cm *ChannelManager) Cleanup(channel *Channel) {
}
func (cm *ChannelManager) SetRegistered(channelName string, account string) (err error) {
if cm.server.Defcon() <= 4 {
return errFeatureDisabled
}
var channel *Channel
cfname, err := CasefoldChannel(channelName)
if err != nil {