mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-02 19:23:34 -07:00
fix #950
This commit is contained in:
@@ -541,10 +541,16 @@ func (channel *Channel) ClientPrefixes(client *Client, isMultiPrefix bool) strin
|
|||||||
|
|
||||||
func (channel *Channel) ClientHasPrivsOver(client *Client, target *Client) bool {
|
func (channel *Channel) ClientHasPrivsOver(client *Client, target *Client) bool {
|
||||||
channel.stateMutex.RLock()
|
channel.stateMutex.RLock()
|
||||||
|
founder := channel.registeredFounder
|
||||||
clientModes := channel.members[client]
|
clientModes := channel.members[client]
|
||||||
targetModes := channel.members[target]
|
targetModes := channel.members[target]
|
||||||
channel.stateMutex.RUnlock()
|
channel.stateMutex.RUnlock()
|
||||||
|
|
||||||
|
if founder != "" && founder == client.Account() {
|
||||||
|
// #950: founder can kick or whatever without actually having the +q mode
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return channelUserModeHasPrivsOver(clientModes.HighestChannelUserMode(), targetModes.HighestChannelUserMode())
|
return channelUserModeHasPrivsOver(clientModes.HighestChannelUserMode(), targetModes.HighestChannelUserMode())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user