Browse Source

fix #1906

Having the 'samode' capability made all KICK commands privileged. This appears
to have been introduced unintentionally by 42316bc04f and I can't find
any discussion of a rationale. Since this goes against our policy that all
ircop (as opposed to channel founder) privileges must be invoked explicitly
(e.g. SAJOIN, SAMODE), remove this.
tags/v2.10.0-rc1
Shivaram Lingamneni 2 years ago
parent
commit
fcb86c54f7
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      irc/handlers.go

+ 1
- 2
irc/handlers.go View File

@@ -1340,7 +1340,6 @@ func sajoinHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
1340 1340
 // the number of users.
1341 1341
 // Addditionally, we support multiple channels and a single user.
1342 1342
 func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool {
1343
-	hasPrivs := client.HasRoleCapabs("samode")
1344 1343
 	channels := strings.Split(msg.Params[0], ",")
1345 1344
 	users := strings.Split(msg.Params[1], ",")
1346 1345
 	if (len(channels) != len(users)) && (len(users) != 1) && (len(channels) != 1) {
@@ -1398,7 +1397,7 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
1398 1397
 			rb.Add(nil, server.name, ERR_NOSUCHNICK, client.nick, utils.SafeErrorParam(kick.nick), client.t("No such nick"))
1399 1398
 			continue
1400 1399
 		}
1401
-		channel.Kick(client, target, comment, rb, hasPrivs)
1400
+		channel.Kick(client, target, comment, rb, false)
1402 1401
 	}
1403 1402
 	return false
1404 1403
 }

Loading…
Cancel
Save