Started reworking skaldctl. Give room status along with room name.

This commit is contained in:
Storm Dragon
2026-05-30 22:46:32 -04:00
parent 4f35f4b933
commit 26c7808587
15 changed files with 639 additions and 556 deletions
+11
View File
@@ -405,6 +405,11 @@ func validHallName(name string) bool {
return s == "/"+name
}
// ValidHallName reports whether name is safe to use as a hall name.
func ValidHallName(name string) bool {
return validHallName(name)
}
func add(name string, desc *Description) (*Hall, []Client, error) {
if !validHallName(name) {
return nil, nil, UserError("illegal hall name")
@@ -1034,6 +1039,11 @@ func validUsername(username string) bool {
return username != "" && validHallName(username)
}
// ValidUsername reports whether username is safe to use as a login name.
func ValidUsername(username string) bool {
return validUsername(username)
}
// called locked
func (g *Hall) getPermission(creds ClientCredentials) (string, []string, error) {
desc := g.description
@@ -1097,6 +1107,7 @@ type Status struct {
AuthServer string `json:"authServer,omitempty"`
AuthPortal string `json:"authPortal,omitempty"`
Locked bool `json:"locked,omitempty"`
Recording bool `json:"recording,omitempty"`
ClientCount *int `json:"clientCount,omitempty"`
CanChangePassword bool `json:"canChangePassword,omitempty"`
}