Zone Lock Management Commands

These commands are meant for an admin-only object (And thus do no permission checking of their own) set wizard, or for use only with zones that it itself otherwise controls, and so might require tweaking for your specific purpose. They implement an easy way to manage the @lock/zones of zones, but can be adapted to any sort of lock.

Author: Raevnos
Category: Other
Commands: @break, @create, @lset, @pemit, @set.
Compatibility: CobraMUSH, PennMUSH.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Zone Lock Management Commands

@create Zone Lock Managment Commands
@lock/Basic Zone Lock Managment Commands==me
@lset Zone Lock Managment Commands/Basic=no_inherit
@set Zone Lock Managment Commands = !NO_COMMAND
&ADD_CMD Zone Lock Managment Commands=$+zone/add *=*:@pemit %#=+ZONE: [if(setr(1, pmatch(%1)), name(%q1) has been added to [name(%0)]'s @lock/zone, No such player '%1')]; @break not(%q1); @lock/zone %0=setunion(lock(%0/zone), =%q1, |);
&DESCRIBE Zone Lock Managment Commands=These commands are meant for an admin-only object (And thus do no permission checking of their own) set wizard, or for use only with zones that it itself otherwise controls, and so might require tweaking for your specific purpose. They implement an easy way to manage the @lock/zones of zones, but can be adapted to any sort of lock.%r%r+zone/add <zone dbref>=<player>: Add someone to the zone's @lock/zone%r+zone/drop <zone dbref=<player>: Remove someone from the zone's @lock/zone.
@set Zone Lock Managment Commands/DESCRIBE=no_command visual public nearby
&DROP_CMD Zone Lock Managment Commands=$+zone/drop *=*:@pemit %#=+ZONE: [if(setr(1, pmatch(%1)), name(%q1) has been removed from [name(%0)]'s @lock/zone, No such player '%1')]; @break not(%q1); @lock/zone %0=setdiff(lock(%0/zone), =%q1, |);

look Zone Lock Managment Commands