mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-26 05:49:25 +01:00
channel: Fix +m (moderated) and +R (registeredonly) channel modes, add note about opers overriding +m/+R
This commit is contained in:
parent
b850a6c1d9
commit
e3a0387cf5
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user