Channel
A Channel is a typed handle to one live communication channel. Obtain handles
with mux.comsys.channel,
mux.comsys.create_channel, or
mux.comsys.list_channels. Channel state is available only
through methods; assigning fields raises mux.arg.invalid.
Methods
| Method | Description |
|---|---|
Channel:name | Returns the channel name. |
Channel:object | Returns the attached Object, or nil. |
Channel:user_count | Returns the number of membership records. |
Channel:max_user_count | Returns the allocated membership capacity. |
Channel:message_count | Returns the lifetime message count. |
Channel:set_object | Attaches an Object supplying description and channel locks; nil detaches it. |
Channel:flags | Returns a ChannelFlags handle. |
Channel:emit | Delivers an administrative message; { no_header = true } omits [channel]. |
Channel:who | Returns active member records; { all = true } includes inactive records. |
Channel:add_player | Adds a player with an alias and controls whether the join is announced. |
Channel:boot_player | Announces a God-administered boot and removes the member’s aliases. |
who returns a dense array of records shaped as
{ object = Object, listening = boolean }. The default applies the native
active-member test; all corresponds to @chan/who <name>/all. Trusted Lua
does not apply actor-relative hidden-member filtering.
emit validates UTF-8 and rejects embedded NUL bytes. It uses native delivery,
history, receive-lock, in-character-location, and message-count behavior.
add_player accepts an Object or dbref for a player, registers a player-local
alias, and bypasses the channel join lock. A quiet join still sends the player
the normal direct confirmations but omits the channel-wide announcement.
boot_player accepts an Object or dbref, requires an existing membership, and
preserves the native departure and alias-removal side effects.