3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 00:19:29 +01:00

Merge pull request #1915 from slingamn/privileged_kick

fix #1906
This commit is contained in:
Shivaram Lingamneni 2022-02-08 05:52:04 -05:00 committed by GitHub
commit 59ef59870a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -1340,7 +1340,6 @@ func sajoinHandler(server *Server, client *Client, msg ircmsg.Message, rb *Respo
// the number of users.
// Addditionally, we support multiple channels and a single user.
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) && (len(channels) != 1) {
@ -1398,7 +1397,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
}

@ -1 +1 @@
Subproject commit 88a8f8ad8dfa4bec80d419271f65bb6901d98def
Subproject commit 6b1084faced6cb3875af34db74c0e4c092e09319