Latest code. Working voice, still needs some ui cleanup and accessibility fixes but in decent shape.
This commit is contained in:
@@ -676,9 +676,24 @@ func DelClient(c Client) {
|
||||
g.Name(), "delete", c.Id(), c.Username(), nil, nil,
|
||||
)
|
||||
}
|
||||
closeSystemClientsIfNoUsers(g, clients)
|
||||
autoLockKick(g)
|
||||
}
|
||||
|
||||
func closeSystemClientsIfNoUsers(g *Hall, clients []Client) {
|
||||
var system []Client
|
||||
for _, c := range clients {
|
||||
if member("system", c.Permissions()) {
|
||||
system = append(system, c)
|
||||
} else {
|
||||
return
|
||||
}
|
||||
}
|
||||
for _, c := range system {
|
||||
c.Kick("", nil, "hall is empty")
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Hall) GetClients(except Client) []Client {
|
||||
g.mu.Lock()
|
||||
defer g.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user