let admin in if room locked
This commit is contained in:
parent
1e77a1afde
commit
14caa1fba8
@ -34,9 +34,12 @@ func (h *MessageHandler) Connected(id string, socket *WebSocket) (bool, string,
|
||||
}
|
||||
|
||||
if h.locked {
|
||||
session, ok := h.sessions.Get(id)
|
||||
if !ok || !session.Admin() {
|
||||
h.logger.Debug().Msg("server locked")
|
||||
return false, "Server is currently locked", nil
|
||||
}
|
||||
}
|
||||
|
||||
return true, "", nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user