diff --git a/client.go b/client.go index eccf824..3327a8d 100644 --- a/client.go +++ b/client.go @@ -124,10 +124,11 @@ func (c *Client) partChannel(channelName, reason string) { client.reply(rplPart, c.nick, channel.name, reason) } + delete(c.channelMap, channelKey) delete(channel.clientMap, strings.ToLower(c.nick)) if len(channel.clientMap) == 0 { - delete(c.channelMap, channelKey) + delete(c.server.channelMap, channelKey) } }