Master room

From TinyMUX
Jump to navigation Jump to search

As part of the command evaluation process, the server searches all objects in the master room for commands. This is what lets a coder make a new command which everyone can use (ie, a global command): she just has to put it in an object in the master room (or, for that matter, on the master room itself).

The server also searches the master room for exits, during command evaluation, which allows staff to make a global exit. (A global 'OOC' exit might be nifty.)

When players connect and disconnect, the master room is searched for @aconnect and @adisconnect attributes.

40px-1sign46.jpg Fixme: At what other times is the master room searched?

Master room efficiency

Because the master room and its contents are (potentially) searched every time a command is entered, it's important to try to keep it clean and uncluttered. Every object in the Master Room should be something you want searched for commands, and as many attributes as possible should be commands.

It's common practice to create 'function' or 'data' objects for your global commands, and store those objects inside your command objects, which are then inside the Master Room. (Objects inside objects aren't searched - just the objects directly in the room.)

If you're making portable code, you can put the dbrefs of your function and data objects on the command object (usually in va through vz) and reference those - these do get searched, but it's generally a minimal efficiency hit.

Master room security

The master room is your single greatest point of vulnerability. It probably contains a great many items which are wiz-inherit, and anyone on your MUX or MUSH can and will use the commands installed in the Master Room. Thus, general code security is extremely important. Your best code-security admin should be checking all items which go into the master room before they're put there.

Noone should ever enter the master room. Not even your coders. Do your coding on objects outside the master room, test them, then use @cpattr or @tel to send completed and checked code into the master room. Remember, if you're in the master room, YOU get searched for commands too.

I usually leave my master room floating: I prefer not to have any entrance leading into it. If you must have an entrance to it, @lock it to everyone.