From 32bb10f6c6c1b7449252e5bc75426f58b752a121 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 9 Sep 2020 23:15:00 -0400 Subject: [PATCH] make channel founder unkickable --- irc/channel.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/irc/channel.go b/irc/channel.go index ddf4c5e2..18c51d30 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -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())