mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 02:32:39 +01:00
INVITE: Fix dumb crash (thanks for pointing this out, @josephbisch!)
This commit is contained in:
parent
79325d333e
commit
2791476f16
@ -2019,9 +2019,8 @@ func inviteHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
casefoldedChannelName, err := CasefoldChannel(channelName)
|
||||
channel := server.channels.Get(casefoldedChannelName)
|
||||
if err != nil || channel == nil {
|
||||
client.Send(nil, server.name, RPL_INVITING, client.nick, target.nick, channelName)
|
||||
target.Send(nil, client.nickMaskString, "INVITE", target.nick, channel.name)
|
||||
return true
|
||||
client.Send(nil, server.name, ERR_NOSUCHCHANNEL, client.nick, channelName, "No such channel")
|
||||
return false
|
||||
}
|
||||
|
||||
channel.Invite(target, client)
|
||||
|
Loading…
Reference in New Issue
Block a user