Explorar el Código

treat channel founder as such even if they don't have +q

This affects /TOPIC, /INVITE, and a few others.
tags/v2.1.0-rc1
Shivaram Lingamneni hace 4 años
padre
commit
c738a754a2
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5
    0
      irc/channel.go

+ 5
- 0
irc/channel.go Ver fichero

@@ -515,8 +515,13 @@ func channelUserModeHasPrivsOver(clientMode modes.Mode, targetMode modes.Mode) b
515 515
 func (channel *Channel) ClientIsAtLeast(client *Client, permission modes.Mode) bool {
516 516
 	channel.stateMutex.RLock()
517 517
 	clientModes := channel.members[client]
518
+	founder := channel.registeredFounder
518 519
 	channel.stateMutex.RUnlock()
519 520
 
521
+	if founder != "" && founder == client.Account() {
522
+		return true
523
+	}
524
+
520 525
 	for _, mode := range modes.ChannelUserModes {
521 526
 		if clientModes.HasMode(mode) {
522 527
 			return true

Loading…
Cancelar
Guardar