Skip to content

access_mode_get

Read the server’s access mode. Members with manage_access also get counts for the whitelist, pending applications, and usable invites.

{ "cmd": "access_mode_get" }

No fields besides cmd.

A member without manage_access gets the mode and whether a server password is set:

{
"cmd": "access_mode_get",
"mode": "application",
"has_password": false
}

A member with manage_access also gets counts:

{
"cmd": "access_mode_get",
"mode": "application",
"has_password": false,
"whitelist_count": 12,
"pending_applications": 3
}
Field Description
mode open, whitelist, password, application, or invite.
has_password true if a server password is set, in any mode.
whitelist_count Number of whitelisted users. manage_access only.
pending_applications Number of pending applications. manage_access only, and only in application mode.
invite_count Number of usable invites (not expired or used up). manage_access only, and only in invite mode.

Any authenticated member can call it. A connection that hasn’t joined yet can’t; it should read access_control from the handshake frame instead, which has the same mode and has_password.

This command has no errors of its own.