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

@ -706,7 +706,8 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
return errBanned
}
if channel.flags.HasMode(modes.RegisteredOnly) && details.account == "" {
if details.account == "" &&
(channel.flags.HasMode(modes.RegisteredOnly) || channel.server.Defcon() <= 3) {
return errRegisteredOnly
}
}