Currently, passwords required on maps map be spread accross many different maps (eg, map A tells you the password that you need to use on map B).
This works fine, but makes it very difficult to change passwords - one must find all occurences, update all the maps, and then hope that future map changes don't create conflicts.
In addition, in some cases, the passwords themselves are not particularly unique words. In the case of the scorn town gate, the password is 'chain', which could match other messages related to chain mail, etc.
The idea here is follows: Passwords (or other phrases) are placed in the map msg fields with tokens, like $SCORN_PASSWORD There is a centralized file (map/passwords?) that enumerate these passwords, eg:
$SCORN_PASSWORD=chain $WHATEVER=foo bar
During server startup, it reads this password file and records these pairings. Perhaps it also re-reads this file on demand as a DM action.
When a map is first loaded from disk, the loader does special handling with any objects with msg fields - it looks for the keywords, and then does a substitution. I would suggest that it in fact looks for the $, and if it finds then, then matches up on the word.
Note that these phrases do not need to be a single word. EG, this would be valid:
$SKELETON1_RIDDLE=What is at the start of end and the end of time $SKELETON1_ANSWER=e
There should perhaps also be DM commands so that the DM could decide to change the scorn password. However, if this was to be persistent, then perhaps a secondary password file (stored in the var area) is needed, and server reads both on startup. The map file could be copied to the /var area on installation, but that could once again lead to messier merge issues - it is probably safer to have two password files - one distributed with the maps that list all the known variables with default (current) values, and then a second one that overrrides those default values.
As far as implementation steps:
As far as DM or ability for players to change these passwords, there should perhaps be different access levels: