mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-16 02:27:27 +02:00
let admin in if room locked
This commit is contained in:
parent
1e77a1afde
commit
14caa1fba8
1 changed files with 5 additions and 2 deletions
|
@ -34,8 +34,11 @@ func (h *MessageHandler) Connected(id string, socket *WebSocket) (bool, string,
|
|||
}
|
||||
|
||||
if h.locked {
|
||||
h.logger.Debug().Msg("server locked")
|
||||
return false, "Server is currently locked", nil
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue