Skip to content

Bit Locks

You can test for set flags, powers, roles, permissions, or object types in a lock directly, without using an evaluation lock, with these formats:

@lock <object>=flag^<flag>
@lock <object>=power^<power>
@lock <object>=type^<type>

flag^<flag> passes when the object trying the lock has the flag set, as hasflag() reports; power^<power> when it has the power, as haspower() reports; and type^<type> when it is of that type, as hastype() reports.

For example:

> @lock/use Admin Commands=flag^wizard|flag^royalty

To test for a role or a permission (see roles):

@lock <object>=role^<role>
@lock <object>=perm^<permission>

role^<role> passes when the object trying the lock holds the role, its own or its account’s, as hasrole() reports. perm^<permission> passes when it holds the permission, as permission() reports.

> @lock/use Staff Board=role^moderator|perm^players.moderate

You can also test for channel membership with:

@lock <object>=channel^<channel>

channel^<channel> passes when the object trying the lock is on that channel.