diff --git a/irc/modes.go b/irc/modes.go index 8e2aba2e..aa39ace0 100644 --- a/irc/modes.go +++ b/irc/modes.go @@ -526,14 +526,14 @@ func cmodeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool { channelName, err := CasefoldChannel(msg.Params[0]) channel := server.channels.Get(channelName) - channel.membersMutex.Lock() - defer channel.membersMutex.Unlock() - if err != nil || channel == nil { client.Send(nil, server.name, ERR_NOSUCHCHANNEL, client.nick, msg.Params[0], "No such channel") return false } + channel.membersMutex.Lock() + defer channel.membersMutex.Unlock() + // applied mode changes applied := make(ModeChanges, 0)