mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
parent
9033d97c6f
commit
ba72d3acfc
10 changed files with 101 additions and 28 deletions
|
|
@ -1192,9 +1192,16 @@ func joinHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
|
|||
if len(keys) > i {
|
||||
key = keys[i]
|
||||
}
|
||||
err := server.channels.Join(client, name, key, false, rb)
|
||||
err, forward := server.channels.Join(client, name, key, false, rb)
|
||||
if err != nil {
|
||||
sendJoinError(client, name, rb, err)
|
||||
if forward != "" {
|
||||
rb.Add(nil, server.name, ERR_LINKCHANNEL, client.Nick(), utils.SafeErrorParam(name), forward, client.t("Forwarding to another channel"))
|
||||
name = forward
|
||||
err, _ = server.channels.Join(client, name, key, false, rb)
|
||||
}
|
||||
if err != nil {
|
||||
sendJoinError(client, name, rb, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
|
@ -1255,7 +1262,7 @@ func sajoinHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
|
|||
|
||||
channels := strings.Split(channelString, ",")
|
||||
for _, chname := range channels {
|
||||
err := server.channels.Join(target, chname, "", true, rb)
|
||||
err, _ := server.channels.Join(target, chname, "", true, rb)
|
||||
if err != nil {
|
||||
sendJoinError(client, chname, rb, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue