mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
Merge pull request #998 from slingamn/operator_topic
treat channel founder as such even if they don't have +q
This commit is contained in:
commit
51c65f999d
@ -515,8 +515,13 @@ func channelUserModeHasPrivsOver(clientMode modes.Mode, targetMode modes.Mode) b
|
||||
func (channel *Channel) ClientIsAtLeast(client *Client, permission modes.Mode) bool {
|
||||
channel.stateMutex.RLock()
|
||||
clientModes := channel.members[client]
|
||||
founder := channel.registeredFounder
|
||||
channel.stateMutex.RUnlock()
|
||||
|
||||
if founder != "" && founder == client.Account() {
|
||||
return true
|
||||
}
|
||||
|
||||
for _, mode := range modes.ChannelUserModes {
|
||||
if clientModes.HasMode(mode) {
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user