diff --git a/irc/channel.go b/irc/channel.go index 52f18610..2b4e4d3b 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -171,10 +171,6 @@ func (channel *Channel) Part(client *Client, message string) { member.Reply(reply) } channel.Quit(client) - - if !channel.flags[Persistent] && channel.IsEmpty() { - channel.server.channels.Remove(channel) - } } func (channel *Channel) GetTopic(client *Client) { @@ -424,6 +420,10 @@ func (channel *Channel) Notice(client *Client, message string) { func (channel *Channel) Quit(client *Client) { channel.members.Remove(client) client.channels.Remove(channel) + + if !channel.flags[Persistent] && channel.IsEmpty() { + channel.server.channels.Remove(channel) + } } func (channel *Channel) Kick(client *Client, target *Client, comment string) { diff --git a/irc/constants.go b/irc/constants.go index 6ec510bb..d1904d0e 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -23,7 +23,7 @@ var ( ) const ( - SEM_VER = "ergonomadic-1.2.9" + SEM_VER = "ergonomadic-1.2.10" CRLF = "\r\n" MAX_REPLY_LEN = 512 - len(CRLF)