mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-24 22:47:06 +02:00
add locked controls to settings.
This commit is contained in:
parent
b8fccc4d07
commit
cf4e0666fe
4 changed files with 19 additions and 0 deletions
|
@ -40,6 +40,10 @@ func (h *MessageHandlerCtx) controlRequest(session types.Session) error {
|
|||
return ErrIsAlreadyTheHost
|
||||
}
|
||||
|
||||
if h.sessions.Settings().LockedControls && !session.Profile().IsAdmin {
|
||||
return ErrIsNotAllowedToHost
|
||||
}
|
||||
|
||||
if !h.sessions.Settings().ImplicitHosting {
|
||||
// tell session if there is a host
|
||||
if host, hasHost := h.sessions.GetHost(); hasHost {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue