mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
treat channel founder as such even if they don't have +q
This affects /TOPIC, /INVITE, and a few others.
This commit is contained in:
parent
93f1e5b5b8
commit
c738a754a2
@ -515,8 +515,13 @@ func channelUserModeHasPrivsOver(clientMode modes.Mode, targetMode modes.Mode) b
|
|||||||
func (channel *Channel) ClientIsAtLeast(client *Client, permission modes.Mode) bool {
|
func (channel *Channel) ClientIsAtLeast(client *Client, permission modes.Mode) bool {
|
||||||
channel.stateMutex.RLock()
|
channel.stateMutex.RLock()
|
||||||
clientModes := channel.members[client]
|
clientModes := channel.members[client]
|
||||||
|
founder := channel.registeredFounder
|
||||||
channel.stateMutex.RUnlock()
|
channel.stateMutex.RUnlock()
|
||||||
|
|
||||||
|
if founder != "" && founder == client.Account() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
for _, mode := range modes.ChannelUserModes {
|
for _, mode := range modes.ChannelUserModes {
|
||||||
if clientModes.HasMode(mode) {
|
if clientModes.HasMode(mode) {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user