Browse Source

make channel founder unkickable

tags/v2.4.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
32bb10f6c6
1 changed files with 6 additions and 3 deletions
  1. 6
    3
      irc/channel.go

+ 6
- 3
irc/channel.go View File

@@ -553,9 +553,12 @@ func (channel *Channel) ClientHasPrivsOver(client *Client, target *Client) bool
553 553
 	targetModes := channel.members[target]
554 554
 	channel.stateMutex.RUnlock()
555 555
 
556
-	if founder != "" && founder == client.Account() {
557
-		// #950: founder can kick or whatever without actually having the +q mode
558
-		return true
556
+	if founder != "" {
557
+		if founder == client.Account() {
558
+			return true // #950: founder can take any privileged action without actually having +q
559
+		} else if founder == target.Account() {
560
+			return false // conversely, only the founder can kick the founder
561
+		}
559 562
 	}
560 563
 
561 564
 	return channelUserModeHasPrivsOver(clientModes.HighestChannelUserMode(), targetModes.HighestChannelUserMode())

Loading…
Cancel
Save