3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 10:42:52 +01:00
This commit is contained in:
Shivaram Lingamneni 2019-05-12 04:49:45 -04:00
parent 02d5da7cfa
commit b8ca8ec852

View File

@ -534,6 +534,11 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
return
}
if !hasPrivs && channel.flags.HasMode(modes.RegisteredOnly) && details.account == "" && !isInvited {
rb.Add(nil, client.server.name, ERR_BANNEDFROMCHAN, details.nick, chname, client.t("You must be registered to join that channel"))
return
}
client.server.logger.Debug("join", fmt.Sprintf("%s joined channel %s", details.nick, chname))
var message utils.SplitMessage