3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

channel: Fix +m (moderated) and +R (registeredonly) channel modes, add note about opers overriding +m/+R

This commit is contained in:
Daniel Oaks 2017-10-01 15:14:32 +10:00
parent b850a6c1d9
commit e3a0387cf5
2 changed files with 4 additions and 2 deletions

View File

@ -425,6 +425,8 @@ func (channel *Channel) CanSpeak(client *Client) bool {
channel.membersMutex.RLock()
defer channel.membersMutex.RUnlock()
// server operators override nooutside, reggedonly, moderated etc.
// TODO(dan): there should probably instead be a SAPRIVMSG instead that forces this instead of doing it this way...
if client.flags[Operator] {
return true
}

View File

@ -142,8 +142,8 @@ var (
// SupportedChannelModes are the channel modes that we support.
SupportedChannelModes = Modes{
BanMask, ExceptMask, InviteMask, InviteOnly, Key, NoOutside,
OpOnlyTopic, Secret, UserLimit, ChanRoleplaying,
BanMask, ChanRoleplaying, ExceptMask, InviteMask, InviteOnly, Key,
Moderated, NoOutside, OpOnlyTopic, RegisteredOnly, Secret, UserLimit,
}
// supportedChannelModesString acts as a cache for when we introduce users
supportedChannelModesString = SupportedChannelModes.String()