diff --git a/src/irc/channel.go b/src/irc/channel.go index 48c810e7..124cb2dd 100644 --- a/src/irc/channel.go +++ b/src/irc/channel.go @@ -55,10 +55,14 @@ func (ch *Channel) Part(cl *Client, message string) { return } - delete(ch.members, cl) - delete(cl.channels, ch) + if message == "" { + message = cl.Nick() + } ch.Send(RplPart(ch, cl, message), nil) + + delete(ch.members, cl) + delete(cl.channels, ch) } func (ch *Channel) PrivMsg(cl *Client, message string) {