3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00
Allow SAJOIN or implicit always-on join to override channels.operator-only-creation
This commit is contained in:
Shivaram Lingamneni 2021-07-15 04:26:38 -04:00
parent 699921afff
commit c99b2be403

View File

@ -128,7 +128,8 @@ func (cm *ChannelManager) Join(client *Client, name string, key string, isSajoin
if entry == nil { if entry == nil {
registered := cm.registeredChannels.Has(casefoldedName) registered := cm.registeredChannels.Has(casefoldedName)
// enforce OpOnlyCreation // enforce OpOnlyCreation
if !registered && server.Config().Channels.OpOnlyCreation && !client.HasRoleCapabs("chanreg") { if !registered && server.Config().Channels.OpOnlyCreation &&
!(isSajoin || client.HasRoleCapabs("chanreg")) {
return nil, errInsufficientPrivs return nil, errInsufficientPrivs
} }
// enforce confusables // enforce confusables