mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
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.
This commit is contained in:
parent
3994125d88
commit
db547020c8
@ -1306,7 +1306,6 @@ func sajoinHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
|
||||
|
||||
// KICK <channel>{,<channel>} <user>{,<user>} [<comment>]
|
||||
func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *ResponseBuffer) bool {
|
||||
hasPrivs := client.HasRoleCapabs("samode")
|
||||
channels := strings.Split(msg.Params[0], ",")
|
||||
users := strings.Split(msg.Params[1], ",")
|
||||
if (len(channels) != len(users)) && (len(users) != 1) {
|
||||
@ -1349,7 +1348,7 @@ func kickHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respons
|
||||
rb.Add(nil, server.name, ERR_NOSUCHNICK, client.nick, utils.SafeErrorParam(kick.nick), client.t("No such nick"))
|
||||
continue
|
||||
}
|
||||
channel.Kick(client, target, comment, rb, hasPrivs)
|
||||
channel.Kick(client, target, comment, rb, false)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user