remove locks.

This commit is contained in:
Miroslav Šedivý
2024-04-21 20:37:58 +02:00
parent 014b68e1fb
commit 7cc53a0429
31 changed files with 12 additions and 660 deletions

View File

@ -49,9 +49,7 @@ const (
const (
ADMIN_BAN = "admin/ban"
ADMIN_KICK = "admin/kick"
ADMIN_LOCK = "admin/lock"
ADMIN_MUTE = "admin/mute"
ADMIN_UNLOCK = "admin/unlock"
ADMIN_UNMUTE = "admin/unmute"
ADMIN_CONTROL = "admin/control"
ADMIN_RELEASE = "admin/release"

View File

@ -11,9 +11,8 @@ type Message struct {
}
type SystemInit struct {
Event string `json:"event"`
ImplicitHosting bool `json:"implicit_hosting"`
Locks map[string]string `json:"locks"`
Event string `json:"event"`
ImplicitHosting bool `json:"implicit_hosting"`
}
type SystemMessage struct {

View File

@ -55,8 +55,6 @@ type SessionManager interface {
ClearHost()
Has(id string) bool
Get(id string) (Session, bool)
SetControlLocked(locked bool)
CanControl(id string) bool
Members() []*Member
Admins() []*Member
Destroy(id string)

View File

@ -11,7 +11,6 @@ type Stats struct {
Members []*Member `json:"members"`
Banned map[string]string `json:"banned"` // IP -> session ID (that banned it)
Locked map[string]string `json:"locked"` // resource name -> session ID (that locked it)
ServerStartedAt time.Time `json:"server_started_at"`
LastAdminLeftAt *time.Time `json:"last_admin_left_at"`
@ -31,6 +30,5 @@ type WebSocketHandler interface {
Shutdown() error
Upgrade(w http.ResponseWriter, r *http.Request) error
Stats() Stats
IsLocked(resource string) bool
IsAdmin(password string) (bool, error)
}