mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
make channel founder unkickable
This commit is contained in:
parent
f5e9fd3e77
commit
32bb10f6c6
1 changed files with 6 additions and 3 deletions
|
|
@ -553,9 +553,12 @@ func (channel *Channel) ClientHasPrivsOver(client *Client, target *Client) bool
|
|||
targetModes := channel.members[target]
|
||||
channel.stateMutex.RUnlock()
|
||||
|
||||
if founder != "" && founder == client.Account() {
|
||||
// #950: founder can kick or whatever without actually having the +q mode
|
||||
return true
|
||||
if founder != "" {
|
||||
if founder == client.Account() {
|
||||
return true // #950: founder can take any privileged action without actually having +q
|
||||
} else if founder == target.Account() {
|
||||
return false // conversely, only the founder can kick the founder
|
||||
}
|
||||
}
|
||||
|
||||
return channelUserModeHasPrivsOver(clientModes.HighestChannelUserMode(), targetModes.HighestChannelUserMode())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue