mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 03:02:48 +01:00
modes: Kill a crash
This commit is contained in:
parent
a8e13b062b
commit
cec3416eae
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user