forked from External/grumble
Add support for MaxChannelUsers config option (limit the amount of users of channels on the server)
This commit is contained in:
parent
1baecfdbec
commit
0b1794f9b5
1 changed files with 6 additions and 1 deletions
|
|
@ -591,7 +591,12 @@ func (server *Server) handleUserStateMessage(client *Client, msg *Message) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// fixme(mkrautz): Check whether the channel is full.
|
maxChannelUsers := server.cfg.IntValue("MaxChannelUsers")
|
||||||
|
if len(dstChan.clients) >= maxChannelUsers {
|
||||||
|
client.sendPermissionDeniedFallback(mumbleproto.PermissionDenied_ChannelFull,
|
||||||
|
0x010201, "Channel is full")
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if userstate.Mute != nil || userstate.Deaf != nil || userstate.Suppress != nil || userstate.PrioritySpeaker != nil {
|
if userstate.Mute != nil || userstate.Deaf != nil || userstate.Suppress != nil || userstate.PrioritySpeaker != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue