mirror of
https://github.com/ergochat/ergo.git
synced 2025-02-06 01:24:07 +01:00
KICK: Allow multiple kicks to the same channel
This commit is contained in:
parent
a8eabe8e9c
commit
f57a43f3da
@ -1339,12 +1339,12 @@ func kickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
kicks := make(map[string]string)
|
var kicks [][]string
|
||||||
for index, channel := range channels {
|
for index, channel := range channels {
|
||||||
if len(users) == 1 {
|
if len(users) == 1 {
|
||||||
kicks[channel] = users[0]
|
kicks = append(kicks, []string{channel, users[0]})
|
||||||
} else {
|
} else {
|
||||||
kicks[channel] = users[index]
|
kicks = append(kicks, []string{channel, users[index]})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1352,7 +1352,9 @@ func kickHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
if len(msg.Params) > 2 {
|
if len(msg.Params) > 2 {
|
||||||
comment = msg.Params[2]
|
comment = msg.Params[2]
|
||||||
}
|
}
|
||||||
for chname, nickname := range kicks {
|
for _, info := range kicks {
|
||||||
|
chname := info[0]
|
||||||
|
nickname := info[1]
|
||||||
casefoldedChname, err := CasefoldChannel(chname)
|
casefoldedChname, err := CasefoldChannel(chname)
|
||||||
channel := server.channels.Get(casefoldedChname)
|
channel := server.channels.Get(casefoldedChname)
|
||||||
if err != nil || channel == nil {
|
if err != nil || channel == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user