From Elendor

Jump to: navigation, search
 Elendor Customizations                  May 1, 2010

 The following lists changes made to the Elendor hardcode made by Eonwe,
 Lukthil, and Sauron. The Elendor hardcode is not available in source or
 binary form on any ftp site. It is an Elendor exclusive!

 * All code involving attributes (attrib.c) was rewritten. See HELP
 ELENDOR ATTRIBUTES for information on this huge improvement.
 * The room-type flags OUTSIDE and UNDERGROUND were added. They are
 mutually exclusive. (Setting one will unset the other.)
 * The FIGHTER, KILLED (player-type), WEAPON, BEAST, and ARROW
 (thing-type) flags were added as part of the combat system. The KILLED
 flag changes the speak and pose prefix for a player to change to "From
 the dead, " and the unparsed name to change to "Ghost of <name>".
 * The /save switch was added to the @uptime command so that wizards could 
 see the time until the next database save without generating memory
 statistics information which sometimes lags the mush.
 * Several functions involving the WHO list were added including cmds(),
 doing(), and ldes().
 * Asynchronous hostname and ident lookup for admins was ported into the
 PennMUSH code.
 * The connected flag on hidden wizards and royals was made invisible to
 non-privileged players and the INVISIBLE flag (player-type) was added.
 Wizards and royals set INVISIBLE will return away message to pages while
 * The pemit(), oemit(), and wpemit() functions were added.
 * The tel() function was added.
 * The hasflag(thing/attribute,object) syntax was added.
 * An optional /port switch was added to many functions including idle(),
 cmds(), and doing(). This switch causes the function's parameter to be
 interpreted as a descriptor instead of a player's name or dbref.
 * A new collection of list element substitution tokens was added in the
 manner of ##. They are @1, @2, ... @9, @0 and they allow nesting of
 @dolist's, iter()'s, and @search's.
 * Players with see_all power can now use @quota to view quotas.
 * Elendor's hardcoded lighting system and descfun() was added.
 * The escape() function was made safer by adding commas and parentheses
 to the set of characters that it escapes.
 * The descriptor port number of the disconnector is passed to @aconnects
 and @adisconnects as %0. Needed for the +top system.
 * The TOLKIEN_FEATURE (player-type) flag was added.
 * The MISSILE_OK (exit-type) flag was added for the combat system.
 * Instead of the kludgy HARSH_GUEST code provided with Penn, we have a
 more elegant (imho) HARSHER_GUEST which simply prevents a guest from
 controlling any object including him/herself.
 * The add() and mul() functions now correctly interpret space-separated
 lists of numbers as arguments.
 * The pushregs() function was added.
 * The From and Receive locks were added for use with the internal give
 OGIVEFAIL, and AGIVEFAIL was added.
 * @aconnects and @adisconnects are now triggered on all container object
 types (not just rooms).
 * page/list was made the default if a page command is used with more than
 one player in it's first argument. Also the LASTPAGED attribute was made
 invisible to everyone including admins. Even admins shouldn't be able to
 see who you are paging.
 * A method by which administrators can create softcoded global commands
 which override local $commands was added.
 * An idle timeout that is not based on activity was added for connections
 at the login screen. This discourages things like dictionary attacks and
 also corrects the problem of infinite failed connections which are
 transmitting garbage. Also a maximum limit was placed on the number of
 failed login attempts.
 * and() and or() are now so-called "short circuit" boolean functions. That
 is, they only evaluate parameters one at a time until a conclusive result
 (false for and; true for or) is returned.
 * The /silent switch was added for @tel and tel().
 * If you commit the infamous '@dest object=My description' typo, the mush
 will now send you a warning and not destroy the object. :) @dest object
 still works as normal though.
 * Certain often-accessed player-only structures, like QUEUE, were moved out
 of attributes and into the local data region of the object. Improves speed.
 * Added the @nlock and @nunlock commands which allow manipulation of the
 names.cnf file without permanently eliminating entries.
 * Added the @#xxxx/locktype indirect lock syntax so that one lock can
 reference another lock of a different type.
 * Added the Move and Arrive lock types. These low-level locks restrict
 movement even when it was initiated by a wizard or royal. This is important
 for high-security areas that we don't want even the global commands to
 permit access to.
 * Added the "exit's whatever" syntax for use when referring to objects
 through a transparent, non-cloudy exit.
 * Added extensive hardcoded support for the Pueblo html-based mu* client.
 * Added code which allows the mush to listen on multiple ports simultaneous-
 ly. Connections can be accepted on any number of ports, each of which can
 be declared in the mush.cnf file.
 * Extended squish() so that it takes an option delimiter argument.
 * Added the @permit and @inpermit attributes which do the opposite of
 @filter and @infilter.
 * Can now @remit to exits. (Sound is heard in the exit's destination.)
 * Extended @sitelock so that if a site's ip addr OR its hostname match a
 ban, then it gets blocked.
 * Added code to check for any sort of error during a database dump. If one
 is detected, abort the dump, do NOT overwrite the previous dump, and inform
 all online admins. Also log the error.
 * Created the @canconnect attribute which can be used to encode complex
 connection constraints which override the global constraints imposed by
 @sitelock entries.
 * Char creations which fail due to an invalid name choice now log the name
 used. Helpful for assisting players who are having trouble at the login
 * Added the "jailed" sitelock option which causes any connection rejected by
 that entry to be redirected to any available player set JAILED (new player
 * Added hardcode which stores a timestamp on a mush.cnf-specified attribute
 everytime there is a successful save. This permits the softcoded savetime()
 function. Since the attribute gets stored *after* the save completes, the
 savetime() function can be used in @startup code to figure out how much time
 has been lost.
 * Added the force(), trigger(), and wait() functions.
 * Added the limit() function.
 * Created the DISOWNER flag. This is really the only way to implement
 effective security for ZMP's.
 * Added Control Locks as a way to directly allow one object to control
 * Enhanced the @scan command so that it lists the attrs on which matches are
 found (assuming you control the object in question). Also extended the
 syntax so that you can @scan from the perspective of any object you control.
 * Added the passcheck() function.
 * Added the /save switch for @verb.
 * Added the @quell command.
 * Added the txtmem() function.
 * The mush now keeps track of how many bytes of text have been transmitted
 to/from the mush. @uptime reports these statistics.
 * Added the "]" no-eval command prefix.
 * Added the @firstfree command. (Makes restoration of lost objects easier.)
 * Added full server-side term emulation for telnet clients. Support includes
 termtype negotation, automatic shift to character mode, word-preserving text
 wrapping, tf-style line editing (non-visual mode), and history retrieval.
 * Added a set of new softcode entities called "thunks". These are late-
 evaluating ufuns encapsulated as characters which can be passed around
 within strings. See HELP THUNKS for details.
 * Changed the input-processing hardcode so that input is stored in a
 resizable buffer. This allows the command length limit to be raised and
 permits PUEBLOFORM commands, which transmit Pueblo form data, to be very
 * Added a hardcode feature which allows the mush to double as any kind of
 service daemon. The mush can be configured to listen on any number of extra
 ports and to pass commands on these ports directly through to softcode. The
 softcode can then fire off output directly back to descriptors connected to
 those service ports. This enables our mush pop, nntp, and smtp servers.
 * Extended the objeval() syntax to have an optional second argument which
 allows evaluation of a function with some other object as the enactor. See
 * Temporarily add the @profile command whenever the mush is compiled using
 the gnu profiling libraries. This allows us to view the profiling output
 without needing to shutdown the mush.
 * Vastly improved the speed of the game by reworking the code that queues
 raw input from players as commands. Instead of having a separate command
 queue for each player, which requires O(mn) time to process, the new code
 has a single "queue-like" data structure in which all operations are O(1).
 Also improved the wait queue and the semaphore queues in similar ways.
 * Further improved game speed by creating a new uncompress function which
 stops decompression when a ":" is encountered. (Useful for scanning for
 $commands in which case there is usually no need to decompress the entire
 attribute.) Also rewrote the full uncompress function in hand-written
 assembly. Now that's fast.
 * Increased the speed of process_expression by eliminating a useless
 memory allocation and string-copy in one of the inner loops.
 * Increased the speed of database saves by buffering disk output better.
 * Another vast speed improvement achieved by means of a reworking of the
 mush's memory-management scheme. Elendor now uses a region-based memory
 allocation scheme in which csrimalloc's space-efficient scheme is used when
 managing the database itself and one of vmalloc's fast methods is used when
 allocating temporary buffers.
 * Passwords can now contain spaces.

 * The hardcoded HOME command was disabled in favor of a softcoded global.
 * @wallemit, @rwallemit, and @wizwallemit were changed to not print
 nospoof information
 * Pages to hidden wizards and royals that are blocked by a pagelock will
 return an away message instead of an idle message.
 * The JUMP_OK flag was restricted to wizards and royals only.
 * Wizards and god may set mortals and puppets dark. This permits possible
 future coding of magical rings. Dark mortals disappear from contents lists
 but not from the WHO list.
 * Partial disconnects now trigger @aconnects and @adisconnects. This
 permits the coding of our +top system.
 * The restriction that certain flags could only be seen by wizards and
 royals was changed. They can be seen by anyone with see_all.
 * An ineffective restriction that requires ownership to set the DEST_OK or
 CHOWN_OK flag on an object was removed. Only control of the object should
 be required.
 * The wiz force log was changed so that it logs forces OF wizards instead
 of forces BY wizards. The former are of much greater interest.
 * The lwho() function was restricted and the Can_Lwho power was added.
 * The match() function now detects a new syntax where the first parameter is
 a list of wildcard patterns and the second is a single word to match.
 * Speech locks are now restricted to royals and wizards.
 * The restriction that mortals cannot zone an object to itself is too harsh.
 Only rooms have problems when zoned to themselves and that should only
 produce a warning.
 * The HALT flag no longer prevents evaluation of functions. This was
 disabled because the global code needs forced evaluations like objeval(%#,
 function) to continue working even if the player is set HALT.
 * The elock() function was restored to being unrestricted. You shouldn't
 have to control an exit to check whether or not you can walk through it.
 * The iter() function's former behavior of stripping leading delimiter
 characters has been restored to facilitate backwards compatibility.
 * The NOSPOOF flag was made invisible to anyone who doesn't control the
 target and doesn't have See_All. Boy is there a lot less nasty spoofing now.
 * Orphaned objects are no longer sent to PLAYER_START. Instead the
 location they are sent to is now configurable from the hardcode.
 * QUIET flag was made more consistent by recoding a number of success
 messages to be suppressed by it.
 * Function and attribute style @locks were changed to behave more like
 get(). That is, "@lock foo=bar:" should be a lock that is passed iff the
 enactor has no attribute named bar.
 * Added some better warnings to @chzone and @link for possible loose locks.
 * Removed some code which caused a @chown to take place automatically after
 certain uses of @link. Why would you want such a thing?
 * Changed the GAGGED flag so that gagged players can now page wizards and
 royals. We can always pagelock them if necessary, but they should be able
 to talk to us to get ungagged.
 * Changed the dist2d() and dist3d() functions so that they accept and
 return floating-point results. (Pretty useless otherwise.)
 * Disabled the STICKY flag for players, since we do not allow them to go
 home whenever they wish.
 * Changed the is_integer code so that it does NOT reject overly large
 numbers. Big numbers are still numbers. You just need to be careful to
 watch arithmetic overflows in your code. We've already done that so we're
 * Special game comands like WHO and QUIT are no longer case-sensitive.
 * Fixed guest chars so that if they go runaway somehow (i.e. they try to
 execute too many commands and the mush decides that they need to be halted)
 then they get halted, but they don't actually get set HALT. Setting them
 HALT is bad because they can't unset the flag themselves.
 * Removed @shutdown/reboot. It would break our @startup softcode.
 * Added some extra @command aliases for backwards compatibility.
 * Changed @sitelock so that royals can block guest logins, creations, and
 can disable sitelocks. Basically anything that cannot be used to possibly
 sitelock a wizard should be allowed. They can also use @sitelock with no
 arguments to view the sitelock listing.
 * Removed code which disabled @recycle whenever the HATE_DEST config option
 was enabled. The one should not imply the other. @recycle can be disabled
 from mush.cnf if necessary.
 * Added the speakfunc() function which does some low-level string processing
 integral to Elendor's +language system.
 * Changed the hardcode for the inventory, leave, and score commands so that
 if any arguments are provided to these commands, the user input is instead
 matched as a $command. This allows softcoding of commands like "$leave * in
 the *" and the like.
 * Added @dropfail, @odropfail, and @adropfail.
 * Created the mount() function. Mountedness info is not saved in the db.
 * Created the keyword and keycount commands. Generation of the keyword
 search index is performed automatically during regeneration of the help/news
 indeces and is loaded along with the other indeces by @readcache.
 * Restricted @find to royals only. Wizards control everything so they don't
 need it. Mortals shouldn't need to worry about other players' objects. They
 can use @search to find their own.
 * Saved us about 10 megs of ram by hanging attr texts off the end of the
 attr struct itself instead of requiring an extra level of indirection, and
 by shortening atrflags and dbrefs to be 16-bit ints instead of 32-bit ones.
 * Hitting return by itself at the login screen repeats the login screen.
 This is a little more user-friendly than doing nothing.
 * Standard Penn plays it safe with q-regs by disallowing changes to them
 from propagating out of certain operations. This is safe but too conserva-
 tive. In order for our softcode to work, we need changes to q-regs to
 propagate whenever doing so is safe. The solution is a rather complex
 analysis which saves and restores q-regs at certain key points in operations
 that necessitate a series of isolated ufun evaluations. See HELP QCONTEXTS
 for details.

 * Idle messages correctly interpret standard %-substitutions such as %N.
 * Numerous security holes were patched by recoding the function evaluator 
 so that it keeps track of 2 privilege levels as it evaluates nested
 functions. It now remembers both controling-privileges and
 seeing-privileges and uses the appropriate privilege set in the
 appropriate circumstances. (In general, control-privileges is required
 for side-effect functions and seeing-privs for all others.)
 * Several more bugs in the function evaluator were fixed. These involve
 the accidental stripping of whitespace where it shouldn't be stripped and
 failures to detect closing braces when there is an unclosed parenth inside.
 * @verb now passes its stack parameters to its VERB and OVERB arguments
 as well as AVERB.
 * Numerous bugs in con(), exit(), and next() were patched which permitted
 unprivileged players to see hidden objects in locations.
 * The routine which determines whether a given object controls another
 was completely rewritten and all uses of it in the code were checked for
 errors. This patches many many bugs.
 * Many errors involving emits were fixed. Sound was not propagating
 through rooms with no objects in them and certain function uselocks were
 causing any sound that was emitted near them to be garbled.
 * index() was broken and is now fixed.
 * Linux machines were evaluating commands of the form "cmd arg1=arg2" in
 the wrong order. Namely they evaluated arg2 before arg1 which messed up a 
 lot of code. This was fixed.
 * A security hole involving the restricted ICLOC attribute was patched.
 * Buffer lengths across the code were fixed and the safe_str and safe_chr
 routines were made safer and faster.
 * The main engine for @search, lsearch(), and lsearchr() was totally
 rewritten patching many bugs and consolidating a lot of code. It is also
 now much faster.
 * The name-matching routines were all rewritten to fix a number of bugs
 involving exits.
 * A bug which causes many attribute owners to be set to GOD on startup
 was fixed.
 * Repaired two instances of memory leaks in the source code.
 * The filter() function now treats the output of the user-function as a
 normal boolean instead of simply checking for '1'.
 * The @adestroy attribute which was malfunctioning was restored to its old
 wizard-only functionality.
 * Arithmetic overflows no longer crash the mush.
 * @uptime was made safer so that even if it returns strange output, the
 mush will not crash.
 * WHO at the login screen returned repeated lines when it encountered a
 hidden admin. Fixed.
 * Rooms can now execute @link.
 * @sweep now detects _all_ potentially listening objects in your location.
 * When there is a @command with the same name as a @attribute, the command
 takes precedence. You can always set the attribute with &attribute anyway.
 * Several flag abbreviation conflicts were resolved by re-abbreviating flags.
 * An error in the word-based compression library which caused database
 corruption was fixed.
 * Ansi codes are stripped when matching to listen patterns, but they are
 _not_ stripped when propagating sound to object contents.
 * Several bugs associated with the MONITOR flag were fixed and the so-called
 "horrible hack" in set.c was removed and fixed in an elegant way.
 * ##, #$, #@, and @0-@9 now behave exactly the same as %-substitutions. (You
 might not have noticed that they behaved slightly differently before.)
 * Even wizards can't write to dark attributes now.
 * The "#-1 CAN ONLY * ONE ELEMENT" error message returned by some list
 functions has been replaced with more useful return values. List functions
 should attempt to preserve the list, otherwise attempting to do a list
 operation might destroy your list forever.
 * Fixed a bug which caused certain help/news texts to be unviewable when
 their topic names were prefixes of other topic names.
 * Exit lists with mixtures of opaque and non-opaque exits were being
 displayed incorrectly. Fixed.
 * Correct a bug which permitted the softcoding of infinite loops which would
 freeze the game.
 * Improved the consistency of %@ and corrected some bugs which caused %# to
 be inaccurate.
 * Fixed @chownall and the "move" command both of which could crash the game
 when given certain invalid arguments.
 * Fixed hasattr() so that it doesn't mistakenly reveal the existence of
 mortal_dark attributes.
 * Added some bounds checks to the flag table code to prevent crashes.
 * Added code to the nuke programming that resets object homes, exit destin-
 ations, and room drop-tos which target the nuked object.
 * Recoded some areas where two potentially large integers were added and
 could possibly result in an arithmetic overflow that would produce undesired
 * Fixed a bug in @wall that could crash the mush.
 * delete() could crash the mush. Fixed.
 * iter() now evaluates its delimiter argument as it should.
 * Fixed a bug in the mush's random number generator that could cause an
 almost-infinite loop.
 * Players should not be able to pick up an object which contains them.
 * Corrected code which failed to 0-terminate the result of a process_
 expression call.
 * Recoded everything which interacts with the infoslave process. Hostname
 and ident lookup are tricky and interprocess communication is tricky as
 well. All are subject to error, so the code needs to be very robust.
 Failures of all kinds are now handled properly.
 * Bad stuff happens if a connected player gets nuked. @nuke correctly
 refuses to nuke connected targets, but it turns out that a nuked player
 may still connect before the automated purge routine clears them from the
 database. Solution: Disallow connections to players set GOING.
 * Disabled the letter_to_privs hardcode function. It was incorrect and
 was parsing flags in a way that should never be done anyway.
 * Fixed a bug that causes database corruption when exits execute @create,
 @clone, or @open.
 * Fixed table() so that when it truncates a string to fit a field width, it
 does NOT clip important trailing ansi sequences.
 * @attribute/access used to behave as though the /retroactive switch was
 provided even if it was not. Fixed. Also when that switch is provided, do
 not touch the ownership of the affected attrs!
 * @mvattr of an attribute onto itself no longer erases the attribute.
 * Changed @sitelock so that if the second argument to it is invalid, then
 nothing gets added to the sitelock list. The command just fails.
 * Rewrote revwords() so that it can't crash the game anymore.
 * Fixed a buffer overflow bug in the hardcode for event logging.
 * Fixed a buffer overflow problem with @grep/print. Also fixed a bug in
 /iprint which caused matched text to be shown in the wrong case.
 * Modified the typedef for pointers to cmd_* functions to be fully
 qualified. This is necessary to allow the dbref datatype to be a non-int.
 * Corrected the disconnected room checker which failed to warn about any
 disconnected room other than the first one it found.
 * Fixed an ANSI compliance bug in @nunlock 

 Don't forget to check out HELP ELENDOR ATTRIBUTES for a description of all the
 changes to attribute setting and the like too.
Personal tools