mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +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)
|
casefoldedChannelName, err := CasefoldChannel(channelName)
|
||||||
channel := server.channels.Get(casefoldedChannelName)
|
channel := server.channels.Get(casefoldedChannelName)
|
||||||
if err != nil || channel == nil {
|
if err != nil || channel == nil {
|
||||||
client.Send(nil, server.name, RPL_INVITING, client.nick, target.nick, channelName)
|
client.Send(nil, server.name, ERR_NOSUCHCHANNEL, client.nick, channelName, "No such channel")
|
||||||
target.Send(nil, client.nickMaskString, "INVITE", target.nick, channel.name)
|
return false
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
channel.Invite(target, client)
|
channel.Invite(target, client)
|
||||||
|
Loading…
Reference in New Issue
Block a user