This is patch07 to PennMUSH 1.8.1. After applying this patch, you will have version 1.8.1p7 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.8.1-patch07 make clean make install If you use GNU patch 2.2, you probably want the above to be 'patch -b -p1', not just 'patch -p1'. Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c, hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically rebuilt on compile. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Alan/Javelin In this patch: Major changes: ** PLEASE READ ** * The FIXED flag's restriction on 'home' is no longer applied in the hardcode but through restrict.cnf. A new entry has been added to restrictcnf.dst for this -- people running existing MUSHes that use the FIXED flag will want to copy this to their restrict.cnf. Locks: * @lock/take controls who may 'get' something from a container or location; note that @lock/enter no longer controls this on containers but only controls who may 'enter'. The container's TAKE_LOCK`*FAILURE attributes provide messages on a failed get. Suggested by BladedThoth@M*U*S*H. Patch by Talvo@M*U*S*H. Commands: * @chan/recall can take an extra argument to specify the line to start the recall from. Suggested by Sholevi@M*U*S*H. Patch by Talvo@M*U*S*H. Functions: * ulambda() is a version of u() that can take #lambdas. [GM] * speak() for language processing. Suggested by Nymeria@M*U*S*H. Patch by Talvo@M*U*S*H. [3] * width() and height() take an optional second argument to set the default values. Patch by Nathan Baum. * unique() function removes contiguous duplicates in lists. [SW] * nextdbref() returns the next dbref on the free list. Patch by Talvo@M*U*S*H. * Specifying more than one type to locate() now makes each of them preferred (not just the last one). Suggested by Anyasha@ST:Foundations. * namelist() parses a list of dbrefs and possibly-quoted names a la page and returns the corresponding dbrefs. Patch by Talvo@M*U*S*H. * crecall() is a functional form of @chan/recall. Suggestd by Cheetah and Trinsec@M*U*S*H. Patch by Talvo@M*U*S*H. Flags: * The LIGHT flag now overrides the DARK flag consistently. DARK objects will show up in LIGHT rooms and anything set both LIGHT and DARK is effectively LIGHT. Suggested by Renee@ShoreSide. Patch by Talvo@M*U*S*H. Minor changes: * @poll by itself now displays the current poll instead of clearing it. @poll/clear does that. [SW] * Added aliases for @atrlock/@atrchown/atrlock to 'attr' versions in aliascnf.dst. Suggested by Talvo@M*U*S*H. * Players who already have a forbidden name (as their name or alias) may change to that name. Patch by Talvo@M*U*S*H. * New alias_flag() and alias_power() hardcode functions for hackers. Patch by Talvo@M*U*S*H. * Mortals can use @power/list and @power commands. Patch by Talvo@M*U*S*H. * Restriction-checking by power fixed in cases where no flag restrictions were applied. Patch by Talvo@M*U*S*H. * New type GARBAGE for @search/lsearch type class. * @pemit/list now accepts player names as well as dbrefs, a la page. Patch by Talvo@M*U*S*H. Fixes: * pcre.c includes config.h again. [EEH]. * Help fixes by Talvo@M*U*S*H. * Fixes from 1.8.0p12 Prereq: 1.8.1p6 *** 1_8_1.275/Patchlevel Sat, 25 Feb 2006 15:08:23 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.50 600) --- 1_8_1.310(w)/Patchlevel Fri, 31 Mar 2006 19:28:30 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.51 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.1p6 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.1p7 *** 1_8_1.275/README Wed, 02 Feb 2005 09:20:32 -0600 dunemush (pennmush/4_README 1.15 600) --- 1_8_1.310(w)/README Fri, 24 Mar 2006 14:35:27 -0600 dunemush (pennmush/4_README 1.16 600) *************** *** 132,142 **** response and is ideal for unusual bugs. A web-based submission form is at http://www.pennmush.org/jitterbug/pennmush - 3. dunemush@pennmush.org is Javelin's email address. - This is a good place for small suggestions, common-seeming bugs, - etc. -- stuff you wouldn't want to bother all the developers with. - You will receive a quick response. - When reporting a problem, please always include the following information: --- 132,137 ---- *** 1_8_1.275/FAQ Tue, 21 Dec 2004 10:14:22 -0600 dunemush (pennmush/6_FAQ 1.5 600) --- 1_8_1.310(w)/FAQ Fri, 24 Mar 2006 14:34:59 -0600 dunemush (pennmush/6_FAQ 1.6 600) *************** *** 36,47 **** on the devteam. He rewrote the command parser, and PennMUSH was advanced to 1.7.0. ! Currently, the active development team is Javelin, Talek, and Raevnos. ! The stable version is 1.8.0, and the development version is 1.8.1. 1. How do I ask for help with a problem? ! Email to dunemush@pennmush.org When asking for help, please be as specific as you can about the problem. Include at least the following: - Version of PennMUSH including any official patches you've applied --- 36,50 ---- on the devteam. He rewrote the command parser, and PennMUSH was advanced to 1.7.0. ! Currently, the active development team is Javelin, Talek, Raevnos, ! Noltar, and Walker. The stable version is 1.8.0, and the development ! version is 1.8.1. 1. How do I ask for help with a problem? ! Email to pennmush-developers@pennmush.org ! or visit http://www.pennmush.org/jitterbug/pennmush ! When asking for help, please be as specific as you can about the problem. Include at least the following: - Version of PennMUSH including any official patches you've applied *** 1_8_1.275/game/txt/hlp/penntop.hlp Mon, 06 Feb 2006 15:42:19 -0600 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.11.1.1.1.3.2.1.1.1.1.1.1.1.1.1.1.2 600) --- 1_8_1.310(w)/game/txt/hlp/penntop.hlp Mon, 10 Apr 2006 12:11:21 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.11.1.1.1.3.2.1.1.1.1.1.1.1.1.1.1.1.1.2 600) *************** *** 16,28 **** On many MUSHes, list local commands with: +help ! If there are any errors in the help text, please notify a wizard ! in the game, or send mail to dunemush@pennmush.org, who maintains ! PennMUSH (and its distributed help files) but probably has no relation ! to this MUSH in particular. ! & newbie ! If you are new to MUSHing, the help files may seem confusing. Most of them are written in a specific style, however, and once you understand it the files are extremely helpful. --- 16,28 ---- On many MUSHes, list local commands with: +help ! If there are any errors in the help text, please notify a wizard in the ! game, or send mail to pennmush-bugs@pennmush.org, which is the address ! of the team who develop PennMUSH (and its distributed help files) but ! probably have no relation to this MUSH in particular. ! & newbie ! If you are new to MUSHing, the help files may seem confusing. Most of them are written in a specific style, however, and once you understand it the files are extremely helpful. *************** *** 437,443 **** +1 to the previous owner). @open: 1 penny (2 pennies if linked at the same time) ! Type '@config costs' to get the costs for the particular MUSH you are on. See also: MONEY, money(), score & CREDITS --- 437,443 ---- +1 to the previous owner). @open: 1 penny (2 pennies if linked at the same time) ! Type '@config/list costs' to get the costs for the MUSH you are on. See also: MONEY, money(), score & CREDITS *** 1_8_1.275/game/txt/hlp/pennfunc.hlp Fri, 24 Feb 2006 20:43:10 -0600 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.26.1.1.1.1.1.1.1.23.1.2.1.1 600) --- 1_8_1.310(w)/game/txt/hlp/pennfunc.hlp Mon, 10 Apr 2006 12:11:21 -0500 dunemush (pennmush/16_pennfunc.h 1.2.1.50.1.1.1.1.1.2.1.7.1.8.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.26.1.1.1.1.1.1.1.23.1.2.1.9 600) *************** *** 119,127 **** children() con() entrances() exit() followers() following() home() lcon() lexits() loc() locate() lparent() lplayers() lsearch() lvcon() ! lvexits() lvplayers() next() num() owner() ! parent() pmatch() rloc() rnum() room() ! where() zone() See also: DBREF & Information functions --- 119,127 ---- children() con() entrances() exit() followers() following() home() lcon() lexits() loc() locate() lparent() lplayers() lsearch() lvcon() ! lvexits() lvplayers() namelist() next() nextdbref() ! num() owner() parent() pmatch() rloc() ! rnum() room() where() zone() See also: DBREF & Information functions *************** *** 149,155 **** mix() munge() namegrab() namegraball() remove() replace() rest() revwords() setdiff() setinter() setunion() shuffle() sort() sortby() sortkey() ! splice() step() table() wordpos() words() See also: LISTS & Math functions --- 149,156 ---- mix() munge() namegrab() namegraball() remove() replace() rest() revwords() setdiff() setinter() setunion() shuffle() sort() sortby() sortkey() ! splice() step() table() unique() wordpos() ! words() See also: LISTS & Math functions *************** *** 1478,1483 **** --- 1479,1488 ---- See also: match(), matchall(), grab(), regmatch() & GREP() & REGREP() + & WILDGREP() + & GREPI() + & REGREPI() + & WILDGREPI() grep(,,) wildgrep(,,) regrep(,,) *************** *** 2068,2074 **** preferred one. X - Never return #-2. Use the last dbref found if the match is ambiguous. ! If you specify more than one type, the last one will be preferred. Unless you specify an F option, if an object of a different type is found and none of the preferred type are, the found object will be returned. --- 2073,2079 ---- preferred one. X - Never return #-2. Use the last dbref found if the match is ambiguous. ! If you specify more than one type, any will be preferred. Unless you specify an F option, if an object of a different type is found and none of the preferred type are, the found object will be returned. *************** *** 2612,2617 **** --- 2617,2631 ---- that it will continue to do this for the time being. Don't rely on it. Related functions: FULLNAME(), ACCNAME(), INAME() + & NAMELIST() + namelist() + + Namelist takes a list of players of the form used by the page + command and returns a corresponding list of dbrefs. + + >"[namelist(#1 Javelin "ringo spar" bogus)] + You say, "#1 #7 #56 #-1" + & NAMEGRAB() & NAMEGRABALL() namegrab(,) *************** *** 2667,2672 **** --- 2681,2693 ---- apply to exits, as well. See also: lcon(), lexits(), con(), exit() + & NEXTDBREF() + nextdbref() + + This function returns the next dbref on the free list; when the next + object is @created (or @dug, or @opened, or @pcreated, etc.), it + will have this dbref. + & NMWHO() nmwho() *************** *** 3547,3552 **** --- 3568,3726 ---- Prints number of spaces. Useful for times when you want to be able to use lots of spaces to separate things. For example, "a[space(5)]b would print, "Amberyl says, "a b"". + & SPEAK() + speak(, [, + [, [/] + [, [/][, [, ]]]]) + + This function is used to format speech-like constructs, and is + capable of transforming text within a speech string; it is useful for + implementing "language code" and the like. + + When only and are given, this function formats + as if it were speech from , as follows. + + If is... the resulting string is... + : + : + ; + | + " says, "" + says, "" + + The conf parameter say_uses_comma is respected (using "says," or "says"). + If is specified, it is used instead of "says," / "says". + + Continued in 'help Speak2'. + & SPEAK2 + + Examples: + + > say [name(me)] + You say, "Wizard" + > @emit [speak(me, :tests.)] + Wizard tests. + > @emit [speak(me, : 's testing.)] + Wizard's testing. + > @emit [speak(me, ;'s testing.)] + Wizard's testing. + > @emit [speak(me, |Test.)] + Test. + > @emit [speak(me, "Test.)] + Wizard says, "Test." + > @emit [speak(me, Test.)] + Wizard says, "Test." + > @emit [speak(me, Test., yells:)] + Wizard yells: "Test." + + Continued in 'help Speak3'. + + & SPEAK3 + + If is specified (an object/attribute pair or attribute, + as with map() and similar functions), the speech portions of + are passed through the transformation function. + + Speech is delimited by double-quotes (i.e., "text"), or by the + specified and strings. For instance, if you wanted + <> to denote text to be transformed, you would specify + as << and close as >> in the function call. Only the portions of the + string between those delimiters are transformed. If is not + specified, it defaults to . + + The transformation function receives the speech text as %0, the + dbref of as %1, and the speech fragment number as %2. + For non-say input strings (i.e., for an original beginning + with the :, ;, or | tokens), fragments are numbered starting with 1; + otherwise, fragments are numbered starting with 0. (A fragment is + a chunk of speech text within the overall original input string.) + + Continued in 'help Speak4'. + + & SPEAK4 + + Examples: + + > @va me = "Fragment %2 is: %0" + > @emit speak(me, test, ,va) + Wizard says, "Fragment 0 is: test" + > @emit speak(me, "test, ,va) + Wizard says, "Fragment 0 is: test" + > @emit speak(me, "test, yells:, va) + Wizard yells: "Fragment 0 is: test" + > @emit speak(me, :tests. "Hi.", ,va) + Wizard tests. "Fragment 1 is: Hi." + > @emit speak(me, : 's testing. "Hi.", ,va) + Wizard's testing. "Fragment 1 is: Hi." + > @emit speak(me, ;'s testing. "Hi.", ,va) + Wizard's testing. "Fragment 1 is: Hi." + > @emit speak(me, |This is a test. "Hi.", ,va) + This is a test. "Fragment 1 is: Hi." + > @emit speak(me, :tests. "Hi." And... "Bye." The end., ,va) + Wizard tests. "Fragment 1 is: Hi." And... "Fragment 2 is: Bye." The end. + > @emit speak(me, :tests. "Hi." And... <> The end., ,va, , <<, >>) + Wizard tests. "Hi." And... "Fragment 1 is: Bye." The end. + + Continued in 'help Speak5'. + + & SPEAK5 + + If the result of transforming a given speech fragment is a null string, + and is specified (an object/attribute pair or attribute), + that function is used evaluate an alternative result, with %0 as + the dbref of , and %1 as the speech fragment number. + + The functionality can be useful for gracefully handling cases + where speech may be processed down to nothing, such as with language + code where no words are successfully translated. + + Consider this example, where the speech string may be randomly removed: + + > &MUTTER_FN me = [ifelse(rand(2),"%0",)] + > &NONE_FN me = [capstr(subj(%0))] mutters something. + > @emit speak(me, :tests. "Hello there.", mutters:, MUTTER_FN, NONE_FN) + Wizard tests. "Hello there." + OR + Wizard tests. He mutters something. + + Continued in 'help Speak6'. + + & SPEAK6 + + Elegantly handling an empty string when the type of speech is a plain say + is a bit more difficult. In order to facilitate this, when the speech type + is a plain say, the ' says,' is only prepended to the output if + the transformation of the first speech fragment produces something + non-null. Also note that quotes are not placed around such speech + automatically, to allow the user's code to insert whatever is appropriate. + + Below is a more elegant version of the mutter example. Here, we find + the use for say-speech fragments being numbered starting from 0 rather + than 1 -- if the speech fragment number is 0, we know we haven't + given any output yet. + + > &MUTTER_FN me = [ifelse(rand(2),"%0",)] + > &NONE_FN me = [switch(%1,0,name(%0),capstr(subj(%0)))] mutters something. + > @emit speak(me, Hello there., mutters:, MUTTER_FN, NONE_FN) + Wizard mutters: "Hello there." + OR + Wizard mutters something. + + Continued in 'help Speak7'. + + & SPEAK7 + + Here's another example, where words between + signs are reversed, + but those within double-quotes are untouched (demonstrating a technique + useful in something where you want to allow users to mix ordinary speech + with transformed speech). + + > &REV_FN me = [switch(%2,0,backwards,[capstr(subj(%1))] says backwards)], + "[revwords(%0)]" + > @emit speak(me,:tests. "Normal speech." +Mixed up speech+ Success!, , + REV_FN, ,+) + Wizard tests. "Normal speech." He says backwards, "speech up Mixed" Success! + & SPELLNUM() spellnum() *************** *** 4143,4150 **** --- 4317,4326 ---- or ROOM. See "help types of objects" for more. & U() & UFUN() + & ULAMBDA() u([/], , , ...) ufun([/], , , ...) + ulambda([/], , , ...) This allows you to create your own functions and evaluate them. is the attribute that contains the desired *************** *** 4154,4165 **** , , ... are the arguments that get passed to the user function as v(0), v(1), etc. (as in @trigger). You can pass ! up to 10 arguments (v(0) through v(9)); extra arguments will be ! evaluated but not accessible (since v(10) refers to an attribute, ! not another argument). This function is also known as U() (alias for TinyMUSH compatibility). See "help UFUN2" for more. & U2 --- 4330,4341 ---- , , ... are the arguments that get passed to the user function as v(0), v(1), etc. (as in @trigger). You can pass ! up to 10 arguments (v(0) through v(9)). This function is also known as U() (alias for TinyMUSH compatibility). + ulambda() also accepts anonymous attributes. + See "help UFUN2" for more. & U2 *************** *** 4177,4183 **** or cpu time that may be configured in the MUSH. If the evaluation order doesn't quite seem right, adding escapes or breaking up the expression will probably help. ! & UCSTR() ucstr() --- 4353,4359 ---- or cpu time that may be configured in the MUSH. If the evaluation order doesn't quite seem right, adding escapes or breaking up the expression will probably help. ! & UCSTR() ucstr() *************** *** 4254,4260 **** value of %q0 to its original "are delicious!" See also: u(), setq(), r() ! & V() & V-FUNCTION V() --- 4430,4455 ---- value of %q0 to its original "are delicious!" See also: u(), setq(), r() ! ! & UNIQUE() ! unique([, , , ]) ! ! unique() returns a copy of with consecutive duplicate items ! removed. It does not sort the list. The optional describes ! what type of data is in the list; see help sorting for details. If ! no type is given, the elements are compared as strings. The optional ! third and fourth arguments are the list delimiter and output seperator. ! ! Examples: ! > think unique(a b b c b) ! a b c b ! > think unique(1 2 2.0 3, f) ! 1 2 3 ! > think unique(1|2|3|3, n, |, _) ! 1_2_3 ! ! See also: setunion() ! & V() & V-FUNCTION V() *************** *** 4419,4437 **** & HEIGHT() & SCREENWIDTH & SCREENHEIGHT ! width() ! height() These two functions return the screen width and height for a connected player. If the player's client is capable of doing so, it will let the mush know what the correct sizes are on connection and when the client ! is resized. The defaults are 78 for width, and 24 for height, the ! normal minimal values. These can be changed with the special ! SCREENWIDTH and SCREENHEIGHT commands, both of which take a number as ! their sole argument, and set the appropriate field. ! If used on something that's not a player, the functions return the ! default values. The intent of these functions is allow softcode that does formatting to be able to produce a display that can make full use of any given --- 4614,4636 ---- & HEIGHT() & SCREENWIDTH & SCREENHEIGHT ! width([, ]) ! height([, ]) These two functions return the screen width and height for a connected player. If the player's client is capable of doing so, it will let the mush know what the correct sizes are on connection and when the client ! is resized. ! ! The defaults are 78 for width, and 24 for height, the normal minimal ! values. These can be overridden when calling the function by ! providing the default to the function. Players can change the value ! that will be returned when the functions are called on them with the ! special SCREENWIDTH and SCREENHEIGHT commands, both of which take a ! number as their sole argument, and set the appropriate field. ! When used on something that's not a visible player, the functions ! return the default values. The intent of these functions is allow softcode that does formatting to be able to produce a display that can make full use of any given *** 1_8_1.275/game/txt/hlp/pennflag.hlp Mon, 06 Feb 2006 15:30:48 -0600 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1.2.1.2.1.1.1.1.2.1.4.1.2.2.19 600) --- 1_8_1.310(w)/game/txt/hlp/pennflag.hlp Sat, 25 Mar 2006 14:29:55 -0600 dunemush (pennmush/17_pennflag.h 1.1.1.1.1.2.1.1.1.2.1.1.1.2.1.1.2.1.2.1.1.1.1.2.1.4.1.2.2.20 600) *************** *** 272,278 **** Flag: ENTER_OK (all types) If an object or person is ENTER_OK, other players may ! enter the object or person by using 'enter . Only objects which are ENTER_OK may be entered, regardless of the enter lock. Players must also have the ENTER_OK flag set if they wish to be able to receive things given to them by other players via the --- 272,278 ---- Flag: ENTER_OK (all types) If an object or person is ENTER_OK, other players may ! enter the object or person by using 'enter '. Only objects which are ENTER_OK may be entered, regardless of the enter lock. Players must also have the ENTER_OK flag set if they wish to be able to receive things given to them by other players via the *** 1_8_1.275/game/txt/hlp/penncmd.hlp Thu, 16 Feb 2006 11:02:43 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.10.1.1.1.1.1.1.1.1.1.1.1.47.1.1.1.1.1.4 600) --- 1_8_1.310(w)/game/txt/hlp/penncmd.hlp Sat, 25 Mar 2006 14:29:38 -0600 dunemush (pennmush/18_penncmd.hl 1.2.1.1.1.47.1.1.1.1.1.3.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.10.1.1.1.1.1.1.1.1.1.1.1.47.1.1.1.1.1.1.1.6 600) *************** *** 1364,1369 **** --- 1364,1384 ---- @lock/forward me=$me) See also: @filter, @prefix, AUDIBLE, PUPPET + & @DEBUGFORWARDLIST + @debugforwardlist [=] + + When an object is set DEBUG, its @debugforwardlist attribute is checked, + and if present, the debug output is forwarded to all the dbrefs in + the @debugforwardlist. + + The @debugforwardlist must be a space-seperated list of dbrefs. + In order to forward to an object, you must either control it, + have the pemit_all power, or, if it has a @lock/forward set, pass + its @lock/forward. (If you want to allow all objects you own to + forward to you, regardless of whether or not they control you, use + @lock/forward me=$me) + + See also: DEBUG & @unfollow @unfollow = *************** *** 2140,2145 **** --- 2155,2161 ---- @lock/dropto Who can trigger this container's drop-to. @lock/destroy Who can destroy this object if it's DESTROY_OK @lock/interact Who can send sound (say/pose/emit/etc) to this object + @lock/take Who can get things contained in this object See also: @lock, @lset, @clock, FAILURE & @lset *************** *** 2685,2693 **** The /list switch to this command allows you to @pemit a message to a list: @pemit/list [ ] = ! There can be any number of objects in the list. The objects must be ! specified by dbref number. You will not get back a "confirmation" ! message for the /list form of this command. (continued in help @pemit2) & @pemit2 --- 2701,2708 ---- The /list switch to this command allows you to @pemit a message to a list: @pemit/list [ ] = ! There can be any number of objects in the list. You will not get back a ! "confirmation" message for the /list form of this command. (continued in help @pemit2) & @pemit2 *************** *** 2722,2737 **** @power @power =[!] ! This is a wizard-only command which manipuates powers, special privileges ! that can be granted to objects. See also "help powers". ! ! @power/list lists the defined powers. A list of standard powers with ! explanations is given in "help powers list". ! When given a power name as an argument, @power displays information about a power. ! @power =[!] sets (or clears) the given power on an object. God can add, delete, and otherwise manipulate power definitions. --- 2737,2749 ---- @power @power =[!] ! @power/list lists the defined powers (see "help powers"). A list ! of standard powers with explanations is given in "help powers list". When given a power name as an argument, @power displays information about a power. ! The third form manipulates powers on objects, and is limited to Wizards. ! @power =[!] sets (or clears) the given power on an object. God can add, delete, and otherwise manipulate power definitions. *************** *** 2929,2935 **** POWERS, EVAL, EPLAYER, EROOM, EEXIT, and EOBJECT (Or ETHING). If =TYPE, possible s include OBJECT (Or THING), ROOM, ! EXIT, PLAYER. This shows all objects of the specified type. If =NAME, only objects whose name begin with the string will be listed. If =ZONE, only objects in the zone --- 2941,2947 ---- POWERS, EVAL, EPLAYER, EROOM, EEXIT, and EOBJECT (Or ETHING). If =TYPE, possible s include OBJECT (Or THING), ROOM, ! EXIT, PLAYER, GARBAGE. This shows all objects of the specified type. If =NAME, only objects whose name begin with the string will be listed. If =ZONE, only objects in the zone *************** *** 3849,3859 **** get take ! You pick up object, if you pass the object's @lock. You can also do ! get 's , which will fail if either thing is not ENTER_OK ! or the object is locked against you. Some MUSHes choose to disable the ability to take an object in someone else's inventory. ! See also: @lock, ENTER_OK, give, drop, @success, inventory & @abuy @abuy = --- 3861,3872 ---- get take ! You pick up object, if you pass the object's @lock and the container's ! @lock/take (if set). You can also do get 's , which will ! fail if thing is not ENTER_OK, thing has a take-lock that blocks you, ! or object is locked against you. Some MUSHes choose to disable the ability to take an object in someone else's inventory. ! See also: @lock, ENTER_OK, give, drop, @success, inventory & @abuy @abuy = *** 1_8_1.275/game/txt/hlp/pennchat.hlp Fri, 13 Jan 2006 21:44:28 -0600 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.15 600) --- 1_8_1.310(w)/game/txt/hlp/pennchat.hlp Sat, 25 Mar 2006 13:52:45 -0600 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.16 600) *************** *** 102,108 **** & @channel3 @channel/mute = @channel/gag = ! @channel/recall [ = ] Some channels broadcast messages when players connect or disconnect from the MUSH. If you don't want to hear those messages, use @channel/mute --- 102,108 ---- & @channel3 @channel/mute = @channel/gag = ! @channel/recall [ = [,] ] Some channels broadcast messages when players connect or disconnect from the MUSH. If you don't want to hear those messages, use @channel/mute *************** *** 119,126 **** @channel/recall shows you the most recent messages on the channel; the number of messages depends on how the channel is configured, but ! can be limited by specifying . You must be on a channel to ! recall from it. See "help @channel4" for more. & @channel4 --- 119,126 ---- @channel/recall shows you the most recent messages on the channel; the number of messages depends on how the channel is configured, but ! can be limited by specifying to show and a to start ! display from. You must be on a channel to recall from it. See "help @channel4" for more. & @channel4 *************** *** 334,339 **** --- 334,348 ---- @clock. See also: @clock + & CRECALL() + crecall([, [, [, [, ]]]]) + + This function is the functional form of @chan/recall, and returns a + string containing the recalled lines from the channel, separated by + . If is a true value, the recalled lines will + include their timestamps; otherwise, they will not. + + See also: @channel3 & Channel functions Channel functions work with the channel system. *** 1_8_1.275/game/mushcnf.dst Tue, 18 Jan 2005 13:10:33 -0600 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.34.1.3 600) --- 1_8_1.310(w)/game/mushcnf.dst Sat, 25 Mar 2006 15:33:31 -0600 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.34.1.1.1.2 600) *************** *** 209,214 **** --- 209,224 ---- # If you don't want a timeout, set it to 0. unconnected_idle_timeout 5m + # Many common home network routers will drop a connection if there's + # been no activity for a few minutes; they tend to assume the web is + # the internet, and don't deal well with persistant connections like + # mushes use. This option will make the server automatically send a + # 'Are you still there?' query every few minutes to keep the + # connection active. + # NOTE: This doesn't work on all OSes, but does on the most popular + # ones for mush hosting such as linux. + keepalive_timeout 5m + # Should there be a limit on the number of logins the MUSH # can accept? If your operating system has a limited number of # file descriptors per process, you should set this to *** 1_8_1.275/src/wiz.c Fri, 13 Jan 2006 22:26:11 -0600 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.9.1.30.1.3.1.2.1.1.1.4.1.1.1.1.1.6 660) --- 1_8_1.310(w)/src/wiz.c Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/b/23_wiz.c 1.44.1.1.1.1.1.2.1.7.1.1.1.1.1.1.1.1.1.1.1.8.1.2.2.2.1.2.1.1.1.1.1.1.1.2.1.1.1.2.2.17.1.9.1.30.1.3.1.2.1.1.1.4.1.1.1.1.1.8 660) *************** *** 1893,1898 **** --- 1893,1900 ---- spec->type = TYPE_ROOM; } else if (string_prefix("players", restriction)) { spec->type = TYPE_PLAYER; + } else if (string_prefix("garbage", restriction)) { + spec->type = TYPE_GARBAGE; } else { notify(player, T("Unknown type.")); return -1; *************** *** 2038,2044 **** mush_panic(T("Couldn't allocate memory in search!")); for (n = spec.low; n <= spec.high; n++) { ! if (IsGarbage(n)) continue; if (spec.owner != ANY_OWNER && Owner(n) != spec.owner) continue; --- 2040,2046 ---- mush_panic(T("Couldn't allocate memory in search!")); for (n = spec.low; n <= spec.high; n++) { ! if (IsGarbage(n) && spec.type != TYPE_GARBAGE) continue; if (spec.owner != ANY_OWNER && Owner(n) != spec.owner) continue; *** 1_8_1.275/src/speech.c Mon, 06 Feb 2006 15:30:48 -0600 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.7.1.1.3.1.1.6.1.1 660) --- 1_8_1.310(w)/src/speech.c Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.7.1.1.3.1.1.6.1.1.1.1 660) *************** *** 425,431 **** { char *bp, *p; char *nsbuf, *nspbuf; ! char *l; dbref who; int nospoof; --- 425,431 ---- { char *bp, *p; char *nsbuf, *nspbuf; ! const char *l; dbref who; int nospoof; *************** *** 438,445 **** list[BUFFER_LEN - 1] = '\0'; l = trim_space_sep(list, ' '); ! while ((p = split_token(&l, ' '))) { ! who = noisy_match_result(player, p, NOTYPE, MAT_ABSOLUTE); if (GoodObject(who) && okay_pemit(player, who)) { if (nospoof && Nospoof(who)) { if (Paranoid(who)) { --- 438,445 ---- list[BUFFER_LEN - 1] = '\0'; l = trim_space_sep(list, ' '); ! while (l && *l && (p = next_in_list(&l))) { ! who = noisy_match_result(player, p, NOTYPE, MAT_EVERYTHING); if (GoodObject(who) && okay_pemit(player, who)) { if (nospoof && Nospoof(who)) { if (Paranoid(who)) { *** 1_8_1.275/src/predicat.c Sat, 25 Feb 2006 15:08:23 -0600 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.13.1.2.1.14.1.3.1.1 660) --- 1_8_1.310(w)/src/predicat.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.13.1.2.1.14.1.3.1.3 660) *************** *** 406,418 **** (IsPlayer(thing) && !Connected(thing))) return 0; ! /* if the room is lit, you can see any non-dark objects */ else if (can_see_loc) ! return (!DarkLegal(thing)); /* otherwise room is dark and you can only see lit things */ else ! return (Light(thing) && !DarkLegal(thing)); } /** Can a player control a thing? --- 406,422 ---- (IsPlayer(thing) && !Connected(thing))) return 0; ! /* if thing is in a room set LIGHT, it can be seen */ ! else if (IS(Location(thing), TYPE_ROOM, "LIGHT")) ! return 1; ! ! /* if the room is non-dark, you can see objects which are light or non-dark */ else if (can_see_loc) ! return (Light(thing) || !DarkLegal(thing)); /* otherwise room is dark and you can only see lit things */ else ! return (Light(thing)); } /** Can a player control a thing? *************** *** 756,764 **** const unsigned char *scan, *good; dbref lookup; ! if (!ok_name(name) ! || (forbidden_name(name) && !(GoodObject(player) && Wizard(player))) ! || strlen(name) >= (size_t) PLAYER_NAME_LIMIT) return 0; good = (unsigned char *) (PLAYER_NAME_SPACES ? " `$_-.,'" : "`$_-.,'"); --- 760,766 ---- const unsigned char *scan, *good; dbref lookup; ! if (!ok_name(name) || strlen(name) >= (size_t) PLAYER_NAME_LIMIT) return 0; good = (unsigned char *) (PLAYER_NAME_SPACES ? " `$_-.,'" : "`$_-.,'"); *************** *** 772,777 **** --- 774,786 ---- } lookup = lookup_player(name); + + /* A player may only change to a forbidden name if they're already + using that name. */ + if (forbidden_name(name) && !((lookup == thing) || + (GoodObject(player) && Wizard(player)))) + return 0; + return ((lookup == NOTHING) || (lookup == thing)); } *** 1_8_1.275/src/move.c Sat, 27 Aug 2005 12:23:05 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1.1.1.1.33.1.3 660) --- 1_8_1.310(w)/src/move.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/b/51_move.c 1.1.1.18.1.5.1.13.1.3.1.9.1.1.1.1.1.2.1.1.1.1.1.33.1.4 660) *************** *** 551,557 **** return; } /* to steal something, you have to be able to get it, and the ! * object must be ENTER_OK and not locked against you. */ if (could_doit(player, thing) && (POSSGET_ON_DISCONNECTED || --- 551,557 ---- return; } /* to steal something, you have to be able to get it, and the ! * object must be ENTER_OK and not take-locked against you. */ if (could_doit(player, thing) && (POSSGET_ON_DISCONNECTED || *************** *** 559,565 **** Connected(Location(thing)))) && (controls(player, thing) || (EnterOk(Location(thing)) && ! eval_lock(player, Location(thing), Enter_Lock)))) { notify_format(Location(thing), T("%s was taken from you."), Name(thing)); notify_format(thing, T("%s took you."), Name(player)); --- 559,565 ---- Connected(Location(thing)))) && (controls(player, thing) || (EnterOk(Location(thing)) && ! eval_lock(player, Location(thing), Take_Lock)))) { notify_format(Location(thing), T("%s was taken from you."), Name(thing)); notify_format(thing, T("%s took you."), Name(player)); *************** *** 605,610 **** --- 605,615 ---- notify(player, T("You cannot get yourself!")); return; } + if (!eval_lock(player, Location(thing), Take_Lock)) { + fail_lock(player, Location(thing), Take_Lock, + T("You can't take that from there."), NOTHING); + return; + } if (could_doit(player, thing)) { moveto(thing, player); notify_format(thing, T("%s took you."), Name(player)); *** 1_8_1.275/src/match.c Sun, 08 Aug 2004 21:02:22 -0500 dunemush (pennmush/c/2_match.c 1.24.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.30 660) --- 1_8_1.310(w)/src/match.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/2_match.c 1.24.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.30.1.2 660) *************** *** 451,457 **** } else if (strcasecmp(e, "th")) { count = -1; } ! } *mname = ' '; if (count < 0) { /* An error (like '0th' or '12nd') - this wasn't really a count --- 451,458 ---- } else if (strcasecmp(e, "th")) { count = -1; } ! } else ! count = -1; *mname = ' '; if (count < 0) { /* An error (like '0th' or '12nd') - this wasn't really a count *************** *** 677,686 **** /* If a type is given, and only one thing is of that type, return it */ if (preferred_type != NOTYPE) { ! if (Typeof(thing1) == preferred_type) { ! if (Typeof(thing2) != preferred_type) return thing1; ! } else if (Typeof(thing2) == preferred_type) return thing2; } --- 678,687 ---- /* If a type is given, and only one thing is of that type, return it */ if (preferred_type != NOTYPE) { ! if (Typeof(thing1) & preferred_type) { ! if (!(Typeof(thing2) & preferred_type)) return thing1; ! } else if (Typeof(thing2) & preferred_type) return thing2; } *** 1_8_1.275/src/look.c Fri, 24 Feb 2006 21:56:02 -0600 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.57 660) --- 1_8_1.310(w)/src/look.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.58 660) *************** *** 99,105 **** global_eval_context.renv[j][0] = '\0'; bp = arg; DOLIST(thing, Exits(loc)) { ! if ((!(DarkLegal(thing) || (Dark(loc) && !Light(thing)))) && can_interact(thing, player, INTERACT_SEE)) { if (bp != arg) safe_chr(' ', arg, &bp); --- 99,105 ---- global_eval_context.renv[j][0] = '\0'; bp = arg; DOLIST(thing, Exits(loc)) { ! if (((Light(loc) || Light(thing)) || !(Dark(loc) || Dark(thing))) && can_interact(thing, player, INTERACT_SEE)) { if (bp != arg) safe_chr(' ', arg, &bp); *************** *** 127,136 **** return; } /* Scan the room and see if there are any visible exits */ ! if (Dark(loc)) { for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if (!DarkLegal(thing) && Light(thing) && ! can_interact(thing, player, INTERACT_SEE)) { total_count++; if (!Transparented(loc) || Opaque(thing)) exit_count++; --- 127,141 ---- return; } /* Scan the room and see if there are any visible exits */ ! if (Light(loc)) { for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! total_count++; ! if (!Transparented(loc) || Opaque(thing)) ! exit_count++; ! } ! } else if (Dark(loc)) { ! for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if (Light(thing) && can_interact(thing, player, INTERACT_SEE)) { total_count++; if (!Transparented(loc) || Opaque(thing)) exit_count++; *************** *** 138,144 **** } } else { for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if (!DarkLegal(thing) && can_interact(thing, player, INTERACT_SEE)) { total_count++; if (!Transparented(loc) || Opaque(thing)) exit_count++; --- 143,150 ---- } } else { for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if ((Light(thing) || !DarkLegal(thing)) && ! can_interact(thing, player, INTERACT_SEE)) { total_count++; if (!Transparented(loc) || Opaque(thing)) exit_count++; *************** *** 159,165 **** notify_by(loc, player, pbuff); for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if (!DarkLegal(thing) && (!Dark(loc) || Light(thing)) && can_interact(thing, player, INTERACT_SEE)) { strcpy(pbuff, Name(thing)); if ((p = strchr(pbuff, ';'))) --- 165,171 ---- notify_by(loc, player, pbuff); for (thing = Exits(loc); thing != NOTHING; thing = Next(thing)) { ! if ((Light(loc) || Light(thing) || (!DarkLegal(thing) && !Dark(loc))) && can_interact(thing, player, INTERACT_SEE)) { strcpy(pbuff, Name(thing)); if ((p = strchr(pbuff, ';'))) *** 1_8_1.275/src/lock.c Fri, 13 Jan 2006 21:52:27 -0600 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.23.1.1.1.3 660) --- 1_8_1.310(w)/src/lock.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.23.1.1.1.4 660) *************** *** 78,83 **** --- 78,84 ---- const lock_type Destroy_Lock = "Destroy"; /**< Name of destroy lock */ const lock_type Interact_Lock = "Interact"; /**< Name of interaction lock */ const lock_type MailForward_Lock = "MailForward"; /**< Name of mailforward lock */ + const lock_type Take_Lock = "Take"; /**< Name of take lock */ /* Define new lock types here. */ /** Table of lock names and permissions */ *************** *** 106,111 **** --- 107,113 ---- {"Destroy", TRUE_BOOLEXP, GOD, LF_PRIVATE | LF_OWNER, NULL}, {"Interact", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, {"MailForward", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, + {"Take", TRUE_BOOLEXP, GOD, LF_PRIVATE, NULL}, /* Add new lock types just before this line. */ {NULL, TRUE_BOOLEXP, GOD, 0, NULL} }; *** 1_8_1.275/src/game.c Tue, 31 Jan 2006 21:11:52 -0600 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.1.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.7.1.2.2.1.1.32.1.2.2.1.1.1.1.8 660) --- 1_8_1.310(w)/src/game.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.1.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.7.1.2.2.1.1.32.1.2.2.1.1.1.1.1.1.2 660) *************** *** 67,72 **** --- 67,73 ---- #include "function.h" #include "help.h" #include "dbio.h" + #include "pcre.h" #ifdef hpux #include *************** *** 96,102 **** extern void initialize_mt(void); ! extern void conf_default_set(void); static int dump_database_internal(void); static FILE *db_open(const char *filename); --- 97,103 ---- extern void initialize_mt(void); ! extern const unsigned char *tables; extern void conf_default_set(void); static int dump_database_internal(void); static FILE *db_open(const char *filename); *************** *** 974,979 **** --- 975,1035 ---- } \ } while(0) + /** Attempt to tell if the command is a @password or @newpassword, so + * that the password isn't logged by Suspect or log_commands + * \param cmd The command to check + * \return A sanitized version of the command suitable for logging. + */ + static char * + passwd_filter(const char *cmd) + { + static int initialized = 0; + static pcre *pass_ptn, *newpass_ptn; + static char buff[BUFFER_LEN]; + char *bp = buff; + int ovec[20]; + size_t cmdlen; + int matched; + + if (!initialized) { + const char *errptr; + int eo; + + pass_ptn = pcre_compile("^(@pass.*?)\\s([^=]*)=(.*)", + PCRE_CASELESS, &errptr, &eo, tables); + if (!pass_ptn) + do_log(LT_ERR, GOD, GOD, "pcre_compile: %s", errptr); + newpass_ptn = pcre_compile("^(@(?:newp|pcreate)[^=]*)=(.*)", + PCRE_CASELESS, &errptr, &eo, tables); + if (!newpass_ptn) + do_log(LT_ERR, GOD, GOD, "pcre_compile: %s", errptr); + initialized = 1; + } + + cmdlen = strlen(cmd); + + if ((matched = pcre_exec(pass_ptn, NULL, cmd, cmdlen, 0, 0, ovec, 20)) > 0) { + /* It's a password */ + pcre_copy_substring(cmd, ovec, matched, 1, buff, BUFFER_LEN); + bp = buff + strlen(buff); + safe_chr(' ', buff, &bp); + safe_fill('*', ovec[5] - ovec[4], buff, &bp); + safe_chr('=', buff, &bp); + safe_fill('*', ovec[7] - ovec[6], buff, &bp); + } else if ((matched = pcre_exec(newpass_ptn, NULL, cmd, cmdlen, 0, 0, + ovec, 20)) > 0) { + pcre_copy_substring(cmd, ovec, matched, 1, buff, BUFFER_LEN); + bp = buff + strlen(buff); + safe_chr('=', buff, &bp); + safe_fill('*', ovec[5] - ovec[4], buff, &bp); + } else { + safe_strl(cmd, cmdlen, buff, &bp); + } + *bp = '\0'; + return buff; + } + + /** Attempt to match and execute a command. * This function performs some sanity checks and then attempts to * run a command. It checks, in order: built-in commands, *************** *** 1048,1061 **** } orator = player; - log_activity(LA_CMD, player, command); - if (options.log_commands || Suspect(player)) - do_log(LT_CMD, player, NOTHING, "%s", command); - - if Verbose - (player) - raw_notify(Owner(player), tprintf("#%d] %s", player, command)); - /* eat leading whitespace */ while (*command && isspace((unsigned char) *command)) command++; --- 1104,1109 ---- *************** *** 1070,1075 **** --- 1118,1134 ---- if ((!command || !*command) && !from_port) return; + { + char *msg = passwd_filter(command); + + log_activity(LA_CMD, player, msg); + if (options.log_commands || Suspect(player)) + do_log(LT_CMD, player, NOTHING, "%s", msg); + if Verbose + (player) + raw_notify(Owner(player), tprintf("#%d] %s", player, msg)); + } + strcpy(unp, command); cptr = command_parse(player, cause, command, from_port); *** 1_8_1.275/src/funufun.c Tue, 17 Jan 2006 14:08:38 -0600 dunemush (pennmush/c/11_funufun.c 1.25 660) --- 1_8_1.310(w)/src/funufun.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/11_funufun.c 1.26 660) *************** *** 161,166 **** --- 161,184 ---- } /* ARGSUSED */ + FUNCTION(fun_ulambda) + { + char rbuff[BUFFER_LEN]; + ufun_attrib ufun; + + if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) { + safe_str(T(ufun.errmess), buff, bp); + return; + } + + call_ufun(&ufun, args + 1, nargs - 1, rbuff, executor, enactor, pe_info); + + safe_str(rbuff, buff, bp); + + return; + } + + /* ARGSUSED */ FUNCTION(fun_ulocal) { /* Like fun_ufun, but saves the state of the q0-q9 registers *** 1_8_1.275/src/funstr.c Fri, 13 Jan 2006 21:45:41 -0600 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.3.1.5.1.3.1.2.1.1.1.1.1.1.1.1.1.14.1.34 660) --- 1_8_1.310(w)/src/funstr.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/13_funstr.c 1.28.1.1.1.2.1.4.1.6.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.3.1.5.1.3.1.2.1.1.1.1.1.1.1.1.1.14.1.36 660) *************** *** 2110,2112 **** --- 2110,2291 ---- } return; } + + FUNCTION(fun_speak) + { + ufun_attrib transufun; + ufun_attrib nullufun; + dbref speaker; + char *speaker_str; + char *open, *close; + int transform = 0, null = 0, say = 0; + char *wenv[3]; + int funccount; + int fragment = 0; + char *say_string; + char *string; + + speaker = match_thing(executor, args[0]); + if (speaker == NOTHING || speaker == AMBIGUOUS) { + safe_str(T(e_match), buff, bp); + return; + } + speaker_str = unparse_dbref(speaker); + + if (!args[1] || !*args[1]) + return; + + string = args[1]; + + if (nargs > 2 && *args[2] != '\0' && *args[2] != ' ') + say_string = args[2]; + else + say_string = (char *) "says,"; + + if (nargs > 3) { + if (args[3] != '\0') { + /* we have a transform attr */ + transform = 1; + if (!fetch_ufun_attrib(args[3], executor, &transufun, 1)) { + safe_str(T(e_atrperm), buff, bp); + return; + } + if (nargs > 4) { + if (args[4] != '\0') { + /* we have an attr to use when transform returns an empty string */ + null = 1; + if (!fetch_ufun_attrib(args[4], executor, &nullufun, 1)) { + safe_str(T(e_atrperm), buff, bp); + return; + } + } + } + } + } + + if (nargs < 6 || args[5] == '\0') + open = (char *) "\""; + else + open = args[5]; + if (nargs < 7 || args[6] == '\0') + close = open; + else + close = args[6]; + + switch (*string) { + case ':': + safe_str(Name(speaker), buff, bp); + string++; + if (*string == ' ') { + /* semipose it instead */ + while (*string == ' ') + string++; + } else + safe_chr(' ', buff, bp); + break; + case ';': + string++; + safe_str(Name(speaker), buff, bp); + if (*string == ' ') { + /* pose it instead */ + safe_chr(' ', buff, bp); + while (*string == ' ') + string++; + } + break; + case '|': + string++; + break; + case '"': + if (CHAT_STRIP_QUOTE) + string++; + default: + say = 1; + break; + } + + if (!transform) { + /* nice and easy */ + if (say) + safe_format(buff, bp, "%s %s \"%s\"", Name(speaker), say_string, string); + else + safe_str(string, buff, bp); + return; + } + + char rbuff[BUFFER_LEN]; + + if (say) { + /* the whole string has to be transformed */ + wenv[0] = string; + wenv[1] = speaker_str; + wenv[2] = unparse_integer(fragment); + if (call_ufun(&transufun, wenv, 3, rbuff, executor, enactor, pe_info)) { + return; + } + if (strlen(rbuff) > 0) { + safe_format(buff, bp, "%s %s %s", Name(speaker), say_string, rbuff); + return; + } else { + wenv[0] = speaker_str; + wenv[1] = unparse_integer(fragment); + if (call_ufun(&nullufun, wenv, 2, rbuff, executor, enactor, pe_info)) + return; + safe_str(rbuff, buff, bp); + return; + } + } else { + /* only transform portions of string between open and close */ + char *speech; + //char *prev; + int indx; + int finished = 0; + int delete = 0; + + funccount = pe_info->fun_invocations; + while (!finished && (speech = strstr(string, open))) { + fragment++; + indx = string - speech; + if (indx < 0) + indx *= -1; + if (string != NULL && strlen(string) > 0) + safe_strl(string, indx, buff, bp); + speech = speech + strlen(open); // move past open char + // find close-char + string = strstr(speech, close); + if (!string || !(string = string + strlen(close))) { + // no close char, or nothing after it; we're at the end! + finished = 1; + } + delete = (string == NULL ? 0 : strlen(speech) - + (strlen(string) + strlen(close))); + //safe_strl(speech, strlen(speech) - delete, buff, bp); + speech = chopstr(speech, delete); + wenv[0] = speech; + wenv[1] = speaker_str; + wenv[2] = unparse_integer(fragment); + if (call_ufun(&transufun, wenv, 3, rbuff, executor, enactor, pe_info)) + break; + if (*bp == (buff + BUFFER_LEN - 1) && + pe_info->fun_invocations == funccount) + break; + funccount = pe_info->fun_invocations; + if (strlen(rbuff) == 0) { + wenv[0] = speaker_str; + wenv[1] = unparse_integer(fragment); + if (call_ufun(&nullufun, wenv, 2, rbuff, executor, enactor, pe_info)) + break; + } + if (strlen(rbuff) > 0) { + // safe_format(buff, bp, T("\"%s\""), rbuff); + safe_str(rbuff, buff, bp); + } + if (*bp == (buff + BUFFER_LEN - 1) && + pe_info->fun_invocations == funccount) + break; + } + if (string != NULL && strlen(string) > 0) { + safe_str(string, buff, bp); // remaining string (not speech, so not t) + } + } + } *** 1_8_1.275/src/funlist.c Thu, 16 Feb 2006 12:19:23 -0600 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.1.1.12.1.14.1.7.1.20.1.1.1.1.1.12 660) --- 1_8_1.310(w)/src/funlist.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/16_funlist.c 1.3.1.1.1.5.1.2.1.1.1.1.1.4.1.2.1.2.1.19.1.2.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.1.1.12.1.14.1.7.1.20.1.1.1.1.1.13 660) *************** *** 1556,1561 **** --- 1556,1625 ---- #define CACHE_SIZE 8 /**< Maximum size of the lnum cache */ + FUNCTION(fun_unique) + { + char sep; + char **a1, **a2; + int n1, x1, x2; + char *sort_type = ALPHANUM_LIST; + int osepl = 0; + char *osep = NULL, osepd[2] = { '\0', '\0' }; + + /* if no lists, then no work */ + if (!*args[0]) + return; + + if (!delim_check(buff, bp, nargs, args, 3, &sep)) + return; + + a1 = (char **) mush_malloc(MAX_SORTSIZE * sizeof(char *), "ptrarray"); + + if (!a1) + mush_panic("Unable to allocate memory in fun_unique"); + + /* make array out of the list */ + n1 = list2arr(a1, MAX_SORTSIZE, args[0], sep); + + a2 = mush_malloc(n1 * sizeof(char *), "ptrarray"); + if (!a2) + mush_panic("Unable to allocate memory in fun_unique"); + + if (nargs >= 2) + sort_type = get_list_type_noauto(args, nargs, 2); + + if (sort_type == UNKNOWN_LIST) + sort_type = ALPHANUM_LIST; + + if (nargs < 4) { + osepd[0] = sep; + osep = osepd; + if (sep) + osepl = 1; + } else if (nargs == 4) { + osep = args[3]; + osepl = arglens[3]; + } + + + a2[0] = a1[0]; + for (x1 = x2 = 1; x1 < n1; x1++) { + if (gencomp(executor, a1[x1], a2[x2 - 1], sort_type) == 0) + continue; + a2[x2] = a1[x1]; + x2++; + } + + for (x1 = 0; x1 < x2; x1++) { + if (x1 > 0) + safe_strl(osep, osepl, buff, bp); + safe_str(a2[x1], buff, bp); + } + + mush_free(a1, "ptrarray"); + mush_free(a2, "ptrarray"); + + } + /* ARGSUSED */ FUNCTION(fun_lnum) { *** 1_8_1.275/src/fundb.c Sat, 18 Feb 2006 17:18:28 -0600 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.42.1.14.1.1.1.1.1.7 660) --- 1_8_1.310(w)/src/fundb.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.42.1.14.1.1.1.1.1.1.1.6 660) *************** *** 655,661 **** */ if (!(Typeof(thing) & type) || !can_interact(thing, executor, INTERACT_SEE) || ! (skipdark && Dark(thing)) || ((type == TYPE_PLAYER) && skipdark && !Connected(thing))) continue; nthing += 1; --- 655,661 ---- */ if (!(Typeof(thing) & type) || !can_interact(thing, executor, INTERACT_SEE) || ! (skipdark && Dark(thing) && !Light(thing) && !Light(loc)) || ((type == TYPE_PLAYER) && skipdark && !Connected(thing))) continue; nthing += 1; *************** *** 1347,1353 **** { dbref it = match_thing(executor, args[0]); ! if (GoodObject(it)) safe_str(show_time(CreTime(it), 0), buff, bp); else safe_str(T(e_notvis), buff, bp); --- 1347,1353 ---- { dbref it = match_thing(executor, args[0]); ! if (GoodObject(it) && !IsGarbage(it)) safe_str(show_time(CreTime(it), 0), buff, bp); else safe_str(T(e_notvis), buff, bp); *************** *** 1357,1363 **** FUNCTION(fun_mtime) { dbref it = match_thing(executor, args[0]); ! if (!GoodObject(it)) safe_str(T(e_notvis), buff, bp); else if (!Can_Examine(executor, it) || IsPlayer(it)) safe_str(T(e_perm), buff, bp); --- 1357,1363 ---- FUNCTION(fun_mtime) { dbref it = match_thing(executor, args[0]); ! if (!GoodObject(it) || IsGarbage(it)) safe_str(T(e_notvis), buff, bp); else if (!Can_Examine(executor, it) || IsPlayer(it)) safe_str(T(e_perm), buff, bp); *************** *** 1716,1721 **** --- 1716,1751 ---- } } + /* ARGUSED */ + FUNCTION(fun_namelist) + { + + int first = 1; + char *current; + dbref target; + const char *start; + + start = args[0]; + while (start && *start) { + if (!first) + safe_str(" ", buff, bp); + first = 0; + current = next_in_list(&start); + if (*current == '*') + current = current + 1; + target = lookup_player(current); + if (!GoodObject(target)) + target = visible_short_page(executor, current); + if (target == NOTHING) { + safe_str("#-1", buff, bp); + } else if (target == AMBIGUOUS) { + safe_str("#-2", buff, bp); + } else { + safe_dbref(target, buff, bp); + } + } + } + /* ARGSUSED */ FUNCTION(fun_locate) { *************** *** 1740,1762 **** } /* find out our preferred match type and flags */ ! pref_type = NOTYPE; for (p = args[2]; *p; p++) { switch (*p) { case 'N': ! pref_type = NOTYPE; break; case 'E': ! pref_type = TYPE_EXIT; break; case 'P': ! pref_type = TYPE_PLAYER; break; case 'R': ! pref_type = TYPE_ROOM; break; case 'T': ! pref_type = TYPE_THING; break; case 'L': keys = 1; --- 1770,1792 ---- } /* find out our preferred match type and flags */ ! pref_type = 0; for (p = args[2]; *p; p++) { switch (*p) { case 'N': ! pref_type |= NOTYPE; break; case 'E': ! pref_type |= TYPE_EXIT; break; case 'P': ! pref_type |= TYPE_PLAYER; break; case 'R': ! pref_type |= TYPE_ROOM; break; case 'T': ! pref_type |= TYPE_THING; break; case 'L': keys = 1; *************** *** 1808,1813 **** --- 1838,1845 ---- break; } } + if (!pref_type) + pref_type = NOTYPE; if (keys) match_flags = MAT_CHECK_KEYS; *************** *** 1823,1829 **** return; } ! if (force_type && pref_type != NOTYPE && !(Typeof(item) == pref_type)) { safe_dbref(NOTHING, buff, bp); return; } --- 1855,1861 ---- return; } ! if (force_type && !(Typeof(item) & pref_type)) { safe_dbref(NOTHING, buff, bp); return; } *************** *** 1836,1848 **** if (Can_Examine(executor, loc)) safe_dbref(item, buff, bp); else if (can_interact(item, executor, INTERACT_SEE) ! && (!DarkLegal(item) || (Dark(loc) && Light(item)))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); } else { if (can_interact(item, executor, INTERACT_SEE) ! && (See_All(executor) || !DarkLegal(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); --- 1868,1880 ---- if (Can_Examine(executor, loc)) safe_dbref(item, buff, bp); else if (can_interact(item, executor, INTERACT_SEE) ! && (!DarkLegal(item) || Light(loc) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); } else { if (can_interact(item, executor, INTERACT_SEE) ! && (See_All(executor) || !DarkLegal(item) || Light(item))) safe_dbref(item, buff, bp); else safe_dbref(NOTHING, buff, bp); *************** *** 2202,2204 **** --- 2234,2246 ---- safe_str(res, buff, bp); return;; } + + /* ARGSUSED */ + FUNCTION(fun_nextdbref) + { + if (first_free != NOTHING) { + safe_dbref(first_free, buff, bp); + } else { + safe_dbref(db_top, buff, bp); + } + } *** 1_8_1.275/src/function.c Sat, 18 Feb 2006 17:18:28 -0600 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.24.1.4.1.2.2.1.1.1.1.18.1.3 660) --- 1_8_1.310(w)/src/function.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.24.1.4.1.2.2.1.1.1.1.18.1.3.1.8 660) *************** *** 311,316 **** --- 311,317 ---- {"CLOCK", fun_clock, 1, 2, FN_REG}, {"CMSGS", fun_cinfo, 1, 1, FN_REG}, {"COWNER", fun_cowner, 1, 1, FN_REG}, + {"CRECALL", fun_crecall, 3, 5, FN_REG}, {"CSTATUS", fun_cstatus, 2, 2, FN_REG}, {"CTITLE", fun_ctitle, 2, 2, FN_REG}, {"CUSERS", fun_cinfo, 1, 1, FN_REG}, *************** *** 391,397 **** {"HASFLAG", fun_hasflag, 2, 2, FN_REG}, {"HASPOWER", fun_haspower, 2, 2, FN_REG}, {"HASTYPE", fun_hastype, 2, 2, FN_REG}, ! {"HEIGHT", fun_height, 1, 1, FN_REG}, {"HIDDEN", fun_hidden, 1, 1, FN_REG}, {"HOME", fun_home, 1, 1, FN_REG}, {"HOST", fun_hostname, 1, 1, FN_REG}, --- 392,398 ---- {"HASFLAG", fun_hasflag, 2, 2, FN_REG}, {"HASPOWER", fun_haspower, 2, 2, FN_REG}, {"HASTYPE", fun_hastype, 2, 2, FN_REG}, ! {"HEIGHT", fun_height, 1, 2, FN_REG}, {"HIDDEN", fun_hidden, 1, 1, FN_REG}, {"HOME", fun_home, 1, 1, FN_REG}, {"HOST", fun_hostname, 1, 1, FN_REG}, *************** *** 486,491 **** --- 487,493 ---- {"MUNGE", fun_munge, 3, 5, FN_REG}, {"MWHO", fun_lwho, 0, 0, FN_REG}, {"NAME", fun_name, 0, 2, FN_REG}, + {"NAMELIST", fun_namelist, 1, 1, FN_REG}, {"NAMEGRAB", fun_namegrab, 2, 3, FN_REG}, {"NAMEGRABALL", fun_namegraball, 2, 3, FN_REG}, {"NAND", fun_nand, 1, INT_MAX, FN_REG}, *************** *** 498,503 **** --- 500,506 ---- {"NEARBY", fun_nearby, 2, 2, FN_REG}, {"NEQ", fun_neq, 2, 2, FN_REG}, {"NEXT", fun_next, 1, 1, FN_REG}, + {"NEXTDBREF", fun_nextdbref, 0, 0, FN_REG}, {"NLSEARCH", fun_lsearch, 1, INT_MAX, FN_REG}, {"NMWHO", fun_nwho, 0, 0, FN_REG}, {"NOR", fun_nor, 1, INT_MAX, FN_REG}, *************** *** 606,611 **** --- 609,615 ---- {"SOUNDEX", fun_soundex, 1, 1, FN_REG}, {"SOUNDSLIKE", fun_soundlike, 2, 2, FN_REG}, {"SPACE", fun_space, 1, 1, FN_REG}, + {"SPEAK", fun_speak, 2, 7, FN_REG}, {"SPELLNUM", fun_spellnum, 1, 1, FN_REG}, {"SPLICE", fun_splice, 3, 4, FN_REG}, {"SQL", fun_sql, 1, 3, FN_REG}, *************** *** 643,650 **** --- 647,656 ---- {"UCSTR", fun_ucstr, 1, -1, FN_REG}, {"UDEFAULT", fun_uldefault, 2, 12, FN_NOPARSE}, {"UFUN", fun_ufun, 1, 11, FN_REG}, + {"ULAMBDA", fun_ulambda, 1, 11, FN_REG}, {"ULDEFAULT", fun_uldefault, 1, 12, FN_NOPARSE}, {"ULOCAL", fun_ulocal, 1, 11, FN_REG}, + {"UNIQUE", fun_unique, 1, 4, FN_REG}, {"UTCTIME", fun_time, 0, 0, FN_REG}, {"U", fun_ufun, 1, 11, FN_REG}, {"V", fun_v, 1, 1, FN_REG}, *************** *** 652,658 **** {"VERSION", fun_version, 0, 0, FN_REG}, {"VISIBLE", fun_visible, 2, 2, FN_REG}, {"WHERE", fun_where, 1, 1, FN_REG}, ! {"WIDTH", fun_width, 1, 1, FN_REG}, {"WILDGREP", fun_grep, 3, 3, FN_REG}, {"WILDGREPI", fun_grep, 3, 3, FN_REG}, {"WIPE", fun_wipe, 1, 1, FN_REG}, --- 658,664 ---- {"VERSION", fun_version, 0, 0, FN_REG}, {"VISIBLE", fun_visible, 2, 2, FN_REG}, {"WHERE", fun_where, 1, 1, FN_REG}, ! {"WIDTH", fun_width, 1, 2, FN_REG}, {"WILDGREP", fun_grep, 3, 3, FN_REG}, {"WILDGREPI", fun_grep, 3, 3, FN_REG}, {"WIPE", fun_wipe, 1, 1, FN_REG}, *** 1_8_1.275/src/flags.c Mon, 06 Feb 2006 15:30:48 -0600 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.29.1.2.1.2.2.5.1.1 660) --- 1_8_1.310(w)/src/flags.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.29.1.2.1.2.2.5.1.1.1.1 660) *************** *** 2284,2299 **** do_flag_info(ns, player, f->name); } else { /* Insert the flag in the ptab by the given alias */ ! ptab_start_inserts(n->tab); ! ptab_insert(n->tab, alias, f); ! ptab_end_inserts(n->tab); ! if ((f = match_flag_ns(n, alias))) do_flag_info(ns, player, alias); else notify(player, T("Unknown failure adding alias.")); } } /** Change a flag's letter. * \param ns name of the flagspace to use. * \param player the enactor. --- 2284,2327 ---- do_flag_info(ns, player, f->name); } else { /* Insert the flag in the ptab by the given alias */ ! if (alias_flag_generic(ns, name, alias)) do_flag_info(ns, player, alias); else notify(player, T("Unknown failure adding alias.")); } } + /** Add a new alias for a flag. + * \param ns name of the flagspace to use. + * \param name name of the flag + * \param alias new alias for the flag + * \retval 1 alias added successfully + * \retval 0 failed to add alias + */ + int + alias_flag_generic(const char *ns, const char *name, const char *alias) + { + FLAG *f; + FLAGSPACE *n; + + Flagspace_Lookup(n, ns); + + f = match_flag_ns(n, name); + if (!f) { + return 0; /* no such flag 'name' */ + } + + if (ptab_find_exact(n->tab, strupper(alias))) { + return 0; /* a flag called 'alias' already exists */ + } + + ptab_start_inserts(n->tab); + ptab_insert(n->tab, strupper(alias), f); + ptab_end_inserts(n->tab); + return ((f = match_flag_ns(n, alias)) ? 1 : 0); + } + + /** Change a flag's letter. * \param ns name of the flagspace to use. * \param player the enactor. *** 1_8_1.275/src/extchat.c Mon, 06 Feb 2006 15:30:48 -0600 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.27.1.4.1.8.1.1 660) --- 1_8_1.310(w)/src/extchat.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.27.1.4.1.8.1.1.1.5 660) *************** *** 1107,1117 **** CHANUSER *u; dbref victim; ! if (!name && !*name) { notify(player, T("You need to specify a channel.")); return; } ! if (!com && !*com) { notify(player, T("What do you want to do with that channel?")); return; } --- 1107,1117 ---- CHANUSER *u; dbref victim; ! if (!name || !*name) { notify(player, T("You need to specify a channel.")); return; } ! if (!com || !*com) { notify(player, T("What do you want to do with that channel?")); return; } *************** *** 1991,1996 **** --- 1991,1999 ---- notify(player, T("You must specify a channel.")); return; } + if (!title) + title = (const char *) ""; + if (strlen(title) >= CU_TITLE_LEN) { notify(player, T("Title too long.")); return; *************** *** 2411,2417 **** /* Find the channel */ test_channel(player, name, c); /* Find the victim */ ! if ((victim = lookup_player(newowner)) == NOTHING) { notify(player, T("CHAT: Invalid owner.")); return; } --- 2414,2420 ---- /* Find the channel */ test_channel(player, name, c); /* Find the victim */ ! if (!newowner || ((victim = lookup_player(newowner)) == NOTHING)) { notify(player, T("CHAT: Invalid owner.")); return; } *************** *** 3020,3025 **** --- 3023,3141 ---- do_cemit(executor, args[0], args[1], flags); } + /* ARGSUSED */ + FUNCTION(fun_crecall) + { + CHAN *chan; + CHANUSER *u; + int start = -1, num_lines = 10; + char *p = NULL, *buf, *name; + time_t timestamp; + char *stamp; + dbref speaker; + int type; + int first = 1; + char sep; + int showstamp = 0; + + name = args[0]; + if (!name || !*name) { + safe_str(T("#-1 NO SUCH CHANNEL"), buff, bp); + return; + } + + if (!args[1] || !*args[1]) { + /* nothing */ + } else if (is_integer(args[1])) { + num_lines = parse_integer(args[1]); + if (num_lines == 0) + num_lines = INT_MAX; + } else { + safe_str(T(e_int), buff, bp); + return; + } + if (!args[2] || !*args[2]) { + /* nothing */ + } else if (is_integer(args[2])) { + start = parse_integer(args[2]) - 1; + } else { + safe_str(T(e_int), buff, bp); + return; + } + + if (!delim_check(buff, bp, nargs, args, 4, &sep)) + return; + + if (nargs > 4 && args[4] && *args[4]) + showstamp = parse_boolean(args[4]); + + if (num_lines < 0) { + safe_str(T(e_uint), buff, bp); + return; + } + + test_channel(executor, name, chan); + if (!Chan_Can_See(chan, executor)) { + if (onchannel(executor, chan)) + safe_str(T(e_perm), buff, bp); + else + safe_str(T("#-1 NO SUCH CHANNEL"), buff, bp); + return; + } + + u = onchannel(executor, chan); + if (!u &&!Chan_Can_Access(chan, executor)) { + safe_str(T(e_perm), buff, bp); + return; + } + + if (!ChanBufferQ(chan)) { + safe_str(T("#-1 NO RECALL BUFFER"), buff, bp); + return; + } + + if (start < 0) + start = BufferQNum(ChanBufferQ(chan)) - num_lines; + if (isempty_bufferq(ChanBufferQ(chan)) + || BufferQNum(ChanBufferQ(chan)) <= start) { + safe_str(T(e_range), buff, bp); + return; + } + + while (start > 0) { + buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ×tamp); + start--; + } + while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, + ×tamp)) && num_lines > 0) { + if (first) + first = 0; + else + safe_chr(sep, buff, bp); + if (Nospoof(executor) && GoodObject(speaker)) { + char *nsmsg = ns_esnotify(speaker, na_one, &executor, + Paranoid(executor) ? 1 : 0); + if (!showstamp) + safe_format(buff, bp, T("%s %s"), nsmsg, buf); + else { + stamp = show_time(timestamp, 0); + safe_format(buff, bp, T("[%s] %s %s"), stamp, nsmsg, buf); + } + mush_free(nsmsg, "string"); + } else { + if (!showstamp) + safe_str(buf, buff, bp); + else { + stamp = show_time(timestamp, 0); + safe_format(buff, bp, T("[%s] %s"), stamp, buf); + } + } + num_lines--; + } + + + } + COMMAND (cmd_cemit) { int spflags = !strcmp(cmd->name, "@NSCEMIT") ? PEMIT_SPOOF : 0; SPOOF(player, cause, sw); *************** *** 3030,3078 **** COMMAND (cmd_channel) { if (switches) ! do_channel(player, arg_left, arg_right, switches); else if (SW_ISSET(sw, SWITCH_LIST)) do_channel_list(player, arg_left); else if (SW_ISSET(sw, SWITCH_ADD)) ! do_chan_admin(player, arg_left, arg_right, 0); else if (SW_ISSET(sw, SWITCH_DELETE)) ! do_chan_admin(player, arg_left, arg_right, 1); else if (SW_ISSET(sw, SWITCH_NAME)) ! do_chan_admin(player, arg_left, arg_right, 2); else if (SW_ISSET(sw, SWITCH_RENAME)) ! do_chan_admin(player, arg_left, arg_right, 2); else if (SW_ISSET(sw, SWITCH_PRIVS)) ! do_chan_admin(player, arg_left, arg_right, 3); else if (SW_ISSET(sw, SWITCH_RECALL)) ! do_chan_recall(player, arg_left, arg_right, SW_ISSET(sw, SWITCH_QUIET)); else if (SW_ISSET(sw, SWITCH_DECOMPILE)) do_chan_decompile(player, arg_left, SW_ISSET(sw, SWITCH_BRIEF)); else if (SW_ISSET(sw, SWITCH_DESCRIBE)) ! do_chan_desc(player, arg_left, arg_right); else if (SW_ISSET(sw, SWITCH_TITLE)) ! do_chan_title(player, arg_left, arg_right); else if (SW_ISSET(sw, SWITCH_CHOWN)) ! do_chan_chown(player, arg_left, arg_right); else if (SW_ISSET(sw, SWITCH_WIPE)) do_chan_wipe(player, arg_left); else if (SW_ISSET(sw, SWITCH_MUTE)) ! do_chan_user_flags(player, arg_left, arg_right, 0, 0); else if (SW_ISSET(sw, SWITCH_UNMUTE)) do_chan_user_flags(player, arg_left, "n", 0, 0); else if (SW_ISSET(sw, SWITCH_HIDE)) ! do_chan_user_flags(player, arg_left, arg_right, 1, 0); else if (SW_ISSET(sw, SWITCH_UNHIDE)) do_chan_user_flags(player, arg_left, "n", 1, 0); else if (SW_ISSET(sw, SWITCH_GAG)) ! do_chan_user_flags(player, arg_left, arg_right, 2, 0); else if (SW_ISSET(sw, SWITCH_UNGAG)) do_chan_user_flags(player, arg_left, "n", 2, 0); else if (SW_ISSET(sw, SWITCH_WHAT)) do_chan_what(player, arg_left); else if (SW_ISSET(sw, SWITCH_BUFFER)) ! do_chan_buffer(player, arg_left, arg_right); else ! do_channel(player, arg_left, NULL, arg_right); } COMMAND (cmd_chat) { --- 3146,3194 ---- COMMAND (cmd_channel) { if (switches) ! do_channel(player, arg_left, args_right[1], switches); else if (SW_ISSET(sw, SWITCH_LIST)) do_channel_list(player, arg_left); else if (SW_ISSET(sw, SWITCH_ADD)) ! do_chan_admin(player, arg_left, args_right[1], 0); else if (SW_ISSET(sw, SWITCH_DELETE)) ! do_chan_admin(player, arg_left, args_right[1], 1); else if (SW_ISSET(sw, SWITCH_NAME)) ! do_chan_admin(player, arg_left, args_right[1], 2); else if (SW_ISSET(sw, SWITCH_RENAME)) ! do_chan_admin(player, arg_left, args_right[1], 2); else if (SW_ISSET(sw, SWITCH_PRIVS)) ! do_chan_admin(player, arg_left, args_right[1], 3); else if (SW_ISSET(sw, SWITCH_RECALL)) ! do_chan_recall(player, arg_left, args_right, SW_ISSET(sw, SWITCH_QUIET)); else if (SW_ISSET(sw, SWITCH_DECOMPILE)) do_chan_decompile(player, arg_left, SW_ISSET(sw, SWITCH_BRIEF)); else if (SW_ISSET(sw, SWITCH_DESCRIBE)) ! do_chan_desc(player, arg_left, args_right[1]); else if (SW_ISSET(sw, SWITCH_TITLE)) ! do_chan_title(player, arg_left, args_right[1]); else if (SW_ISSET(sw, SWITCH_CHOWN)) ! do_chan_chown(player, arg_left, args_right[1]); else if (SW_ISSET(sw, SWITCH_WIPE)) do_chan_wipe(player, arg_left); else if (SW_ISSET(sw, SWITCH_MUTE)) ! do_chan_user_flags(player, arg_left, args_right[1], 0, 0); else if (SW_ISSET(sw, SWITCH_UNMUTE)) do_chan_user_flags(player, arg_left, "n", 0, 0); else if (SW_ISSET(sw, SWITCH_HIDE)) ! do_chan_user_flags(player, arg_left, args_right[1], 1, 0); else if (SW_ISSET(sw, SWITCH_UNHIDE)) do_chan_user_flags(player, arg_left, "n", 1, 0); else if (SW_ISSET(sw, SWITCH_GAG)) ! do_chan_user_flags(player, arg_left, args_right[1], 2, 0); else if (SW_ISSET(sw, SWITCH_UNGAG)) do_chan_user_flags(player, arg_left, "n", 2, 0); else if (SW_ISSET(sw, SWITCH_WHAT)) do_chan_what(player, arg_left); else if (SW_ISSET(sw, SWITCH_BUFFER)) ! do_chan_buffer(player, arg_left, args_right[1]); else ! do_channel(player, arg_left, NULL, args_right[1]); } COMMAND (cmd_chat) { *************** *** 3176,3200 **** * \endverbatim * \param player the enactor. * \param name the name of the channel. ! * \param lines a string given the number of lines to recall (default all). * \param quiet if true, don't show timestamps. */ void ! do_chan_recall(dbref player, const char *name, const char *lines, int quiet) { CHAN *chan; CHANUSER *u; int num_lines = 10; /* Default if none is given */ char *p = NULL, *buf; time_t timestamp; char *stamp; - int skip; dbref speaker; int type; if (!name || !*name) { notify(player, T("You need to specify a channel.")); return; } if (lines && *lines) { if (is_integer(lines)) { num_lines = parse_integer(lines); --- 3292,3328 ---- * \endverbatim * \param player the enactor. * \param name the name of the channel. ! * \param lineinfo point to array containing lines, optoinal start * \param quiet if true, don't show timestamps. */ void ! do_chan_recall(dbref player, const char *name, char *lineinfo[], int quiet) { CHAN *chan; CHANUSER *u; + const char *lines; + const char *startpos; int num_lines = 10; /* Default if none is given */ + int start = -1; + int all; char *p = NULL, *buf; time_t timestamp; char *stamp; dbref speaker; int type; if (!name || !*name) { notify(player, T("You need to specify a channel.")); return; } + lines = lineinfo[1]; + startpos = lineinfo[2]; + if (startpos && *startpos) { + if (!is_integer(startpos)) { + notify(player, T("Which line do you want to start recall from?")); + return; + } + start = parse_integer(startpos) - 1; + } if (lines && *lines) { if (is_integer(lines)) { num_lines = parse_integer(lines); *************** *** 3229,3269 **** notify(player, T("CHAT: That channel doesn't have a recall buffer.")); return; } ! if (isempty_bufferq(ChanBufferQ(chan))) { notify(player, T("CHAT: Nothing to recall.")); return; } ! skip = BufferQNum(ChanBufferQ(chan)) - num_lines; notify_format(player, T("CHAT: Recall from channel <%s>"), ChanName(chan)); ! do { buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ×tamp); ! if (skip <= 0) { ! if (buf) { ! if (Nospoof(player) && GoodObject(speaker)) { ! char *nsmsg = ns_esnotify(speaker, na_one, &player, ! Paranoid(player) ? 1 : 0); ! if (quiet) ! notify_format(player, "%s %s", nsmsg, buf); ! else { ! stamp = show_time(timestamp, 0); ! notify_format(player, "[%s] %s %s", stamp, nsmsg, buf); ! } ! mush_free(nsmsg, "string"); ! } else { ! if (quiet) ! notify(player, buf); ! else { ! stamp = show_time(timestamp, 0); ! notify_format(player, "[%s] %s", stamp, buf); ! } ! } } } ! skip--; ! } while (buf); notify(player, T("CHAT: End recall")); ! if (!lines || !*lines) notify_format(player, T ("CHAT: To recall the entire buffer, use @chan/recall %s=0"), --- 3357,3400 ---- notify(player, T("CHAT: That channel doesn't have a recall buffer.")); return; } ! if (start < 0) ! start = BufferQNum(ChanBufferQ(chan)) - num_lines; ! if (isempty_bufferq(ChanBufferQ(chan)) ! || (BufferQNum(ChanBufferQ(chan)) <= start)) { notify(player, T("CHAT: Nothing to recall.")); return; } ! all = (start <= 0 && num_lines >= BufferQNum(ChanBufferQ(chan))); notify_format(player, T("CHAT: Recall from channel <%s>"), ChanName(chan)); ! while (start > 0) { buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ×tamp); ! start--; ! } ! while ((buf = iter_bufferq(ChanBufferQ(chan), &p, &speaker, &type, ! ×tamp)) && num_lines > 0) { ! if (Nospoof(player) && GoodObject(speaker)) { ! char *nsmsg = ns_esnotify(speaker, na_one, &player, ! Paranoid(player) ? 1 : 0); ! if (quiet) ! notify_format(player, T("%s %s"), nsmsg, buf); ! else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s %s"), stamp, nsmsg, buf); ! } ! mush_free(nsmsg, "string"); ! } else { ! if (quiet) ! notify(player, buf); ! else { ! stamp = show_time(timestamp, 0); ! notify_format(player, T("[%s] %s"), stamp, buf); } } ! num_lines--; ! } notify(player, T("CHAT: End recall")); ! if (!all) notify_format(player, T ("CHAT: To recall the entire buffer, use @chan/recall %s=0"), *** 1_8_1.275/src/destroy.c Fri, 06 Aug 2004 09:38:25 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1.1.1.1.4.1.1.1.1.1.14 660) --- 1_8_1.310(w)/src/destroy.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1.1.1.1.4.1.1.1.1.1.15 660) *************** *** 727,732 **** --- 727,733 ---- set_name(thing, "Garbage"); Exits(thing) = NOTHING; Home(thing) = NOTHING; + CreTime(thing) = 0; /* Prevents it from matching objids */ clear_objdata(thing); *** 1_8_1.275/src/conf.c Mon, 06 Feb 2006 13:20:39 -0600 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.41.1.1.1.1.1.4 660) --- 1_8_1.310(w)/src/conf.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.41.1.1.1.1.1.1.1.3 660) *************** *** 294,299 **** --- 294,301 ---- {"unconnected_idle_timeout", cf_time, &options.unconnected_idle_timeout, 100000, 0, "limits"} , + {"keepalive_timeout", cf_time, &options.keepalive_timeout, 10000, 0, "limits"} + , {"whisper_loudness", cf_int, &options.whisper_loudness, 100, 0, "limits"} , {"starting_quota", cf_int, &options.starting_quota, 10000, 0, "limits"} *************** *** 1035,1040 **** --- 1037,1043 ---- options.ancestor_player = -1; options.idle_timeout = 0; options.unconnected_idle_timeout = 300; + options.keepalive_timeout = 300; options.dump_interval = 3601; strcpy(options.dump_message, T("GAME: Dumping database. Game may freeze for a minute")); *** 1_8_1.275/src/command.c Sun, 12 Feb 2006 21:24:14 -0600 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.2.1.1.1.1.1.2.1.3.1.10.1.1.3.74.1.6.1.3.1.1.1.1.1.1.1.6 660) --- 1_8_1.310(w)/src/command.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.2.1.1.1.1.1.2.1.3.1.10.1.1.3.74.1.6.1.3.1.1.1.1.1.1.1.10 660) *************** *** 79,85 **** {"@CHANNEL", "LIST ADD DELETE RENAME NAME PRIVS QUIET NOISY DECOMPILE DESCRIBE CHOWN WIPE MUTE UNMUTE GAG UNGAG HIDE UNHIDE WHAT TITLE BRIEF RECALL BUFFER SET", cmd_channel, ! CMD_T_ANY | CMD_T_SWITCHES | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@CHAT", NULL, cmd_chat, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@CHOWNALL", "PRESERVE", cmd_chownall, CMD_T_ANY | CMD_T_EQSPLIT, "WIZARD", 0}, --- 79,86 ---- {"@CHANNEL", "LIST ADD DELETE RENAME NAME PRIVS QUIET NOISY DECOMPILE DESCRIBE CHOWN WIPE MUTE UNMUTE GAG UNGAG HIDE UNHIDE WHAT TITLE BRIEF RECALL BUFFER SET", cmd_channel, ! CMD_T_ANY | CMD_T_SWITCHES | CMD_T_EQSPLIT | CMD_T_NOGAGGED | CMD_T_RS_ARGS, ! 0, 0}, {"@CHAT", NULL, cmd_chat, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@CHOWNALL", "PRESERVE", cmd_chownall, CMD_T_ANY | CMD_T_EQSPLIT, "WIZARD", 0}, *************** *** 219,228 **** {"@PEMIT", "LIST CONTENTS SILENT NOISY NOEVAL SPOOF", cmd_pemit, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, ! {"@POLL", NULL, cmd_poll, CMD_T_ANY, 0, 0}, {"@POOR", NULL, cmd_poor, CMD_T_ANY, 0, 0}, {"@POWER", "ADD TYPE LETTER LIST RESTRICT DELETE ALIAS DISABLE ENABLE", ! cmd_power, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS, "WIZARD", 0}, {"@PROMPT", "SILENT NOISY NOEVAL SPOOF", cmd_prompt, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@PS", "ALL SUMMARY COUNT QUICK", cmd_ps, CMD_T_ANY, 0, 0}, --- 220,229 ---- {"@PEMIT", "LIST CONTENTS SILENT NOISY NOEVAL SPOOF", cmd_pemit, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, ! {"@POLL", "CLEAR", cmd_poll, CMD_T_ANY, 0, 0}, {"@POOR", NULL, cmd_poor, CMD_T_ANY, 0, 0}, {"@POWER", "ADD TYPE LETTER LIST RESTRICT DELETE ALIAS DISABLE ENABLE", ! cmd_power, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS, 0, 0}, {"@PROMPT", "SILENT NOISY NOEVAL SPOOF", cmd_prompt, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@PS", "ALL SUMMARY COUNT QUICK", cmd_ps, CMD_T_ANY, 0, 0}, *************** *** 1719,1727 **** check_flags = cmd->flagmask && !null_flagmask("FLAG", cmd->flagmask); check_powers = cmd->powers && !null_flagmask("POWER", cmd->powers); ! if (check_flags) ok = !!(has_any_flags_by_mask(player, cmd->flagmask)); ! if (!ok && check_powers) ok = !!(has_any_powers_by_mask(player, cmd->powers)); if (!ok) { mess = T("Permission denied."); --- 1720,1731 ---- check_flags = cmd->flagmask && !null_flagmask("FLAG", cmd->flagmask); check_powers = cmd->powers && !null_flagmask("POWER", cmd->powers); ! if (check_flags && check_powers) ! ok = !!(has_any_flags_by_mask(player, cmd->flagmask) ! || has_any_powers_by_mask(player, cmd->powers)); ! else if (check_flags) ok = !!(has_any_flags_by_mask(player, cmd->flagmask)); ! else if (check_powers) ok = !!(has_any_powers_by_mask(player, cmd->powers)); if (!ok) { mess = T("Permission denied."); *** 1_8_1.275/src/cmds.c Mon, 23 Jan 2006 21:19:31 -0600 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.2.1.1.1.3.1.8.1.1.2.2.2.20.1.3.1.7.1.2.1.20.1.2.1.1.1.8 660) --- 1_8_1.310(w)/src/cmds.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.2.1.1.1.3.1.8.1.1.2.2.2.20.1.3.1.7.1.2.1.20.1.2.1.1.1.10 660) *************** *** 238,244 **** COMMAND (cmd_doing) { if (SW_ISSET(sw, SWITCH_HEADER)) ! do_poll(player, arg_left); else do_doing(player, arg_left); } --- 238,244 ---- COMMAND (cmd_doing) { if (SW_ISSET(sw, SWITCH_HEADER)) ! do_poll(player, arg_left, 0); else do_doing(player, arg_left); } *************** *** 429,438 **** COMMAND (cmd_home) { if (!Mobile(player)) return; ! if (Fixed(player)) ! notify(player, T("You can't do that IC!")); ! else ! do_move(player, "home", MOVE_NORMAL); } COMMAND (cmd_kick) { --- 429,435 ---- COMMAND (cmd_home) { if (!Mobile(player)) return; ! do_move(player, "home", MOVE_NORMAL); } COMMAND (cmd_kick) { *************** *** 703,709 **** } COMMAND (cmd_poll) { ! do_poll(player, arg_left); } COMMAND (cmd_poor) { --- 700,706 ---- } COMMAND (cmd_poll) { ! do_poll(player, arg_left, SW_ISSET(sw, SWITCH_CLEAR)); } COMMAND (cmd_poor) { *** 1_8_1.275/src/bsd.c Thu, 16 Feb 2006 12:19:23 -0600 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.48.1.1.1.15.1.10.1.3 660) --- 1_8_1.310(w)/src/bsd.c Mon, 10 Apr 2006 12:14:14 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.48.1.1.1.15.1.10.1.3.1.3 660) *************** *** 3683,3698 **** * \endverbatim * \param player the enactor. * \param message the message to set. */ void ! do_poll(dbref player, const char *message) { int i; if (!Change_Poll(player)) { notify(player, T("Who do you think you are, Gallup?")); return; } strncpy(poll_msg, remove_markup(message, NULL), DOING_LEN - 1); for (i = 0; i < DOING_LEN; i++) { if ((poll_msg[i] == '\r') || (poll_msg[i] == '\n') || --- 3683,3712 ---- * \endverbatim * \param player the enactor. * \param message the message to set. + * \param clear true if the poll should be reset to the default 'Doing' */ void ! do_poll(dbref player, const char *message, int clear) { int i; + if ((!message || !*message) && !clear) { + /* Just display the poll. */ + notify_format(player, T("The current poll is: %s"), poll_msg); + return; + } + if (!Change_Poll(player)) { notify(player, T("Who do you think you are, Gallup?")); return; } + + if (clear) { + strcpy(poll_msg, "Doing"); + notify(player, T("Poll reset.")); + return; + } + strncpy(poll_msg, remove_markup(message, NULL), DOING_LEN - 1); for (i = 0; i < DOING_LEN; i++) { if ((poll_msg[i] == '\r') || (poll_msg[i] == '\n') || *************** *** 3704,3713 **** if (strlen(message) >= DOING_LEN) { poll_msg[DOING_LEN - 1] = 0; notify_format(player, ! T("Poll set. %d characters lost."), strlen(message) - (DOING_LEN - 1)); } else ! notify(player, T("Poll set.")); do_log(LT_WIZ, player, NOTHING, T("Poll Set to '%s'."), poll_msg); } --- 3718,3727 ---- if (strlen(message) >= DOING_LEN) { poll_msg[DOING_LEN - 1] = 0; notify_format(player, ! T("Poll set to '%s'. %d characters lost."), poll_msg, strlen(message) - (DOING_LEN - 1)); } else ! notify_format(player, T("Poll set to: %s"), poll_msg); do_log(LT_WIZ, player, NOTHING, T("Poll Set to '%s'."), poll_msg); } *************** *** 4200,4205 **** --- 4214,4221 ---- safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); else if ((match = lookup_desc(executor, args[0]))) safe_integer(match->width, buff, bp); + else if (args[1]) + safe_str(args[1], buff, bp); else safe_str("78", buff, bp); } *************** *** 4211,4216 **** --- 4227,4234 ---- safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); else if ((match = lookup_desc(executor, args[0]))) safe_integer(match->height, buff, bp); + else if (args[1]) + safe_str(args[1], buff, bp); else safe_str("24", buff, bp); } *** 1_8_1.275/hdrs/version.h Sat, 25 Feb 2006 15:08:23 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.56 660) --- 1_8_1.310(w)/hdrs/version.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.57 660) *************** *** 1,4 **** #define VERSION "1.8.1" ! #define PATCHLEVEL "6" ! #define PATCHDATE "[02/25/2006]" ! #define NUMVERSION 1008001006 --- 1,4 ---- #define VERSION "1.8.1" ! #define PATCHLEVEL "7" ! #define PATCHDATE "[03/21/2006]" ! #define NUMVERSION 1008001007 *** 1_8_1.275/hdrs/lock.h Fri, 13 Jan 2006 22:11:28 -0600 dunemush (pennmush/d/6_lock.h 1.28 660) --- 1_8_1.310(w)/hdrs/lock.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/6_lock.h 1.29 660) *************** *** 111,116 **** --- 111,117 ---- extern const lock_type Destroy_Lock; /* Who can @dest me if I'm dest_ok? */ extern const lock_type Interact_Lock; extern const lock_type MailForward_Lock; /* Who can forward mail to me */ + extern const lock_type Take_Lock; /* Who can take from the contents of this object? */ /* Declare new lock types here! */ #endif /* __LOCK_H */ *** 1_8_1.275/hdrs/game.h Mon, 31 Oct 2005 12:22:59 -0600 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.22.1.3.1.2.1.5 660) --- 1_8_1.310(w)/hdrs/game.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.22.1.3.1.2.1.6 660) *************** *** 27,33 **** extern void hide_player(dbref player, int hide); enum motd_type { MOTD_MOTD, MOTD_WIZ, MOTD_DOWN, MOTD_FULL, MOTD_LIST }; extern void do_motd(dbref player, enum motd_type key, const char *message); ! extern void do_poll(dbref player, const char *message); /* From cque.c */ extern void do_wait (dbref player, dbref cause, char *arg1, char *cmd, int until); --- 27,33 ---- extern void hide_player(dbref player, int hide); enum motd_type { MOTD_MOTD, MOTD_WIZ, MOTD_DOWN, MOTD_FULL, MOTD_LIST }; extern void do_motd(dbref player, enum motd_type key, const char *message); ! extern void do_poll(dbref player, const char *message, int clear); /* From cque.c */ extern void do_wait (dbref player, dbref cause, char *arg1, char *cmd, int until); *** 1_8_1.275/hdrs/flags.h Thu, 15 Jul 2004 14:45:40 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.38 660) --- 1_8_1.310(w)/hdrs/flags.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/14_flags.h 1.1.1.1.1.1.1.1.1.2.1.3.2.1.1.4.1.1.1.1.2.1.1.39 660) *************** *** 99,104 **** --- 99,108 ---- int negate_perms); #define add_flag(n,l,t,p,x) add_flag_generic("FLAG",n,l,t,p,x) #define add_power(n,l,t,p,x) add_flag_generic("POWER",n,l,t,p,x) + extern int alias_flag_generic(const char *ns, const char *name, + const char *alias); + #define alias_flag(n,a) alias_flag_generic("FLAG",n,a); + #define alias_power(n,a) alias_flag_generic("POWER",n,a); extern void do_list_flags(const char *ns, dbref player, const char *arg, int lc, const char *label); extern char *list_all_flags(const char *ns, const char *name, dbref privs, *** 1_8_1.275/hdrs/extchat.h Mon, 17 Jan 2005 16:36:41 -0600 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.4.1.1 660) --- 1_8_1.310(w)/hdrs/extchat.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.4.1.1.1.1 660) *************** *** 228,234 **** extern void do_chan_what(dbref player, const char *partname); extern void do_chan_desc(dbref player, const char *name, const char *title); extern void do_chan_title(dbref player, const char *name, const char *title); ! extern void do_chan_recall(dbref player, const char *name, const char *lines, int quiet); extern void do_chan_buffer(dbref player, const char *name, const char *lines); extern void init_chat(void); --- 228,234 ---- extern void do_chan_what(dbref player, const char *partname); extern void do_chan_desc(dbref player, const char *name, const char *title); extern void do_chan_title(dbref player, const char *name, const char *title); ! extern void do_chan_recall(dbref player, const char *name, char *lineinfo[], int quiet); extern void do_chan_buffer(dbref player, const char *name, const char *lines); extern void init_chat(void); *** 1_8_1.275/hdrs/copyrite.h Sun, 08 Aug 2004 21:35:52 -0500 dunemush (pennmush/d/19_copyrite.h 1.5 660) --- 1_8_1.310(w)/hdrs/copyrite.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/19_copyrite.h 1.6 660) *************** *** 1,13 **** /* copyrite.h */ /* ! * Copyright, License, and Credits for PennMUSH 1.x. Revised October 2002. * * I. Copyrights * * PennMUSH 1.x ! * Copyright (c) 1995-2002, Alan Schwartz, T. Alexander Popiel, Shawn Wagner ! * Contact email for Alan Schwartz: . * * Some code used in this server may have been derived from the * TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is --- 1,13 ---- /* copyrite.h */ /* ! * Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006. * * I. Copyrights * * PennMUSH 1.x ! * Copyright (c) 1995-2006, T. Alexander Popiel ! * and Shawn Wagner * * Some code used in this server may have been derived from the * TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is *************** *** 170,176 **** * * Past and present PennMUSH development team members: * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, ! * Shawn Wagner, Ervin Hearn III * Past and present PennMUSH porters: * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III * TinyMUSH 2.2, TinyMUSH 3.0, TinyMUX 2, and RhostMUSH developers --- 170,176 ---- * * Past and present PennMUSH development team members: * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, ! * Shawn Wagner, Ervin Hearn III, Alan "Javelin" Schwartz * Past and present PennMUSH porters: * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III * TinyMUSH 2.2, TinyMUSH 3.0, TinyMUX 2, and RhostMUSH developers *** 1_8_1.275/hdrs/conf.h Sun, 05 Feb 2006 14:43:59 -0600 dunemush (pennmush/d/20_conf.h 1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.2.1.1.2.1.2.13.1.4.1.20.1.24.1.4 660) --- 1_8_1.310(w)/hdrs/conf.h Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/d/20_conf.h 1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.2.1.1.2.1.2.13.1.4.1.20.1.24.2.3 660) *************** *** 115,120 **** --- 115,121 ---- dbref ancestor_player; /**< The ultimate parent player */ int idle_timeout; /**< Maximum idle time allowed, in minutes */ int unconnected_idle_timeout; /**< Maximum idle time for connections without dbrefs, in minutes */ + int keepalive_timeout; /**< Number of seconds between TCP keepalive pings */ int dump_interval; /**< Interval between database dumps, in seconds */ char dump_message[256]; /**< Message shown at start of nonforking dump */ char dump_complete[256]; /**< Message shown at end of nonforking dump */ *** 1_8_1.275/COPYRITE Sun, 05 Feb 2006 14:16:16 -0600 dunemush (pennmush/d/29_COPYRITE 1.9 600) --- 1_8_1.310(w)/COPYRITE Fri, 24 Mar 2006 14:32:49 -0600 dunemush (pennmush/d/29_COPYRITE 1.10 600) *************** *** 1,13 **** /* copyrite.h */ /* ! * Copyright, License, and Credits for PennMUSH 1.x. Revised October 2002. * * I. Copyrights * * PennMUSH 1.x ! * Copyright (c) 1995-2002, Alan Schwartz, T. Alexander Popiel, Shawn Wagner ! * Contact email for Alan Schwartz: . * * Some code used in this server may have been derived from the * TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is --- 1,13 ---- /* copyrite.h */ /* ! * Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006. * * I. Copyrights * * PennMUSH 1.x ! * Copyright (c) 1995-2006, T. Alexander Popiel and ! * Shawn Wagner . * * Some code used in this server may have been derived from the * TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is *************** *** 170,176 **** * * Past and present PennMUSH development team members: * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, ! * Shawn Wagner, Ervin Hearn III, Greg Millam * Past and present PennMUSH porters: * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III * TinyMUSH 2.2, TinyMUSH 3.0, TinyMUX 2, and RhostMUSH developers --- 170,176 ---- * * Past and present PennMUSH development team members: * T. Alexander Popiel, Ralph Melton, Thorvald Natvig, Luuk de Waard, ! * Shawn Wagner, Ervin Hearn III, Greg Millam, Alan "Javelin" Schwartz * Past and present PennMUSH porters: * Nick Gammon, Sylvia, Dan Williams, Ervin Hearn III * TinyMUSH 2.2, TinyMUSH 3.0, TinyMUX 2, and RhostMUSH developers *** 1_8_1.275/Makefile.SH Sun, 30 Oct 2005 17:09:09 -0600 dunemush (pennmush/d/30_Makefile.S 1.14.1.1.1.7.1.1.1.22 700) --- 1_8_1.310(w)/Makefile.SH Fri, 24 Mar 2006 14:42:56 -0600 dunemush (pennmush/d/30_Makefile.S 1.14.1.1.1.7.1.1.1.21.1.2 700) *************** *** 39,46 **** # This section of the file should be automatically configured by # the Configure script. If it doesn't work, you might try starting # from the Makefile.old that's included instead, and reporting ! # your problem (including this Makefile) to Paul/Javelin, ! # dunemush@pennmush.org # # If you want to profile the code, add -pg -a -DPROFILING to CCFLAGS # and (probably) remove -O --- 39,45 ---- # This section of the file should be automatically configured by # the Configure script. If it doesn't work, you might try starting # from the Makefile.old that's included instead, and reporting ! # your problem (including this Makefile) to pennmush-bugs@pennmush.org # # If you want to profile the code, add -pg -a -DPROFILING to CCFLAGS # and (probably) remove -O *** 1_8_1.275/Configure Fri, 13 Jan 2006 22:07:52 -0600 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.7.1.15.1.1.1.2.1.2 710) --- 1_8_1.310(w)/Configure Fri, 24 Mar 2006 14:36:33 -0600 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.7.1.15.1.1.1.2.1.3 710) *************** *** 631,637 **** $me: Fatal Error: I can't find a Bourne Shell anywhere. Usually it's in /bin/sh. How did you even get this far? ! Please contact me (Javelin) at dunemush@pennmush.org and we'll try to straighten this all out. EOM exit 1 --- 631,637 ---- $me: Fatal Error: I can't find a Bourne Shell anywhere. Usually it's in /bin/sh. How did you even get this far? ! Please contact me (PennMUSH developers) at pennmush-developers@pennmush.org and we'll try to straighten this all out. EOM exit 1 *************** *** 1191,1197 **** You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o ! and contact the author (dunemush@pennmush.org). EOM echo $n "Continue? [n] $c" >&4 --- 1191,1197 ---- You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o ! and contact the author (pennmush-developers@pennmush.org). EOM echo $n "Continue? [n] $c" >&4 *************** *** 1285,1291 **** Unix system. If despite that it blows up on yours, your best bet is to edit Configure and run it again. If you can't run Configure for some reason, you'll have to generate a config.sh file by hand. Whatever problems you ! have, let me (dunemush@pennmush.org) know how I blew it. This installation script affects things in two ways: --- 1285,1291 ---- Unix system. If despite that it blows up on yours, your best bet is to edit Configure and run it again. If you can't run Configure for some reason, you'll have to generate a config.sh file by hand. Whatever problems you ! have, let me (pennmush-developers@pennmush.org) know how I blew it. This installation script affects things in two ways: *************** *** 1593,1599 **** (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 dflt='' : Half the following guesses are probably wrong... If you have better ! : tests or hints, please send them to dunemush@pennmush.org : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix --- 1593,1599 ---- (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 dflt='' : Half the following guesses are probably wrong... If you have better ! : tests or hints, please send them to pennmush-developers@pennmush.org : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix *** 1_8_1.275/src/pcre.c Mon, 30 Jan 2006 15:17:01 -0600 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1.1.1.1.10 660) --- 1_8_1.310(w)/src/pcre.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/d/36_pcre.c 1.4.1.3.1.3.1.1.1.1.1.1.1.11 660) *************** *** 44,49 **** --- 44,50 ---- /* Modified by Alan Schwartz for PennMUSH to change the use of * 'isblank' as a variable (reported to Philip Hazel for pcre 4.5) */ + #include "config.h" #include #include #include *** 1_8_1.275/game/txt/hlp/penncode.hlp Thu, 15 Jul 2004 14:37:11 -0500 dunemush (pennmush/d/40_penncode.h 1.5.1.8 600) --- 1_8_1.310(w)/game/txt/hlp/penncode.hlp Fri, 24 Mar 2006 14:33:29 -0600 dunemush (pennmush/d/40_penncode.h 1.5.1.10 600) *************** *** 1,19 **** & code & contact PennMUSH is developed by a team of developers whose names are ! listed in 'help changes'. It is maintained by Javelin, aka ! Alan Schwartz. Suggestions, comments, and bug reports are welcome: Report bugs at: pennmush-bugs@pennmush.org Comments/suggestions to: pennmush-developers@pennmush.org - Reach Javelin at: dunemush@pennmush.org For information about downloading PennMUSH, see 'help download'. For information about changes in versions of the code, see 'help changes'. & download The latest version of this MUSH code is available at ! http://download..pennmush.org/Source. It will be called something like pennmush-1.7.6p0.tar.Z, depending on the version number. You will also find files of translations of server messages into various languages in Source/translations/. See help i18n --- 1,18 ---- & code & contact PennMUSH is developed by a team of developers whose names are ! listed in 'help changes'. Suggestions, comments, and bug reports are ! welcome: Report bugs at: pennmush-bugs@pennmush.org Comments/suggestions to: pennmush-developers@pennmush.org For information about downloading PennMUSH, see 'help download'. For information about changes in versions of the code, see 'help changes'. & download The latest version of this MUSH code is available at ! http://download.pennmush.org/Source. It will be called something like pennmush-1.7.6p0.tar.Z, depending on the version number. You will also find files of translations of server messages into various languages in Source/translations/. See help i18n *************** *** 49,61 **** & copyright & copyrite & license ! Copyright, License, and Credits for PennMUSH 1.x. Revised October 2002. I. Copyrights PennMUSH 1.x ! Copyright (c) 1995-2002, Alan Schwartz, T. Alexander Popiel, Shawn Wagner ! Contact email for Alan Schwartz: . Some code used in this server may have been derived from the TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is --- 48,60 ---- & copyright & copyrite & license ! Copyright, License, and Credits for PennMUSH 1.x. Revised March 2006. I. Copyrights PennMUSH 1.x ! Copyright (c) 1995-2006, T. Alexander Popiel ! and Shawn Wagner . Some code used in this server may have been derived from the TinyMUSH 2.2 source code, with permission. TinyMUSH 2.2 is *** 1_8_1.275/src/mysocket.c Tue, 08 Jun 2004 12:15:45 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.19 660) --- 1_8_1.310(w)/src/mysocket.c Mon, 10 Apr 2006 12:14:15 -0500 dunemush (pennmush/f/0_mysocket.c 1.16.1.1.1.1.1.1.1.4.1.4.1.20 660) *************** *** 354,360 **** } ! /** Enable TCP keepalive on the given socket if we can. * \param s socket. */ --- 354,360 ---- } ! #ifndef INFOSLAVE /** Enable TCP keepalive on the given socket if we can. * \param s socket. */ *************** *** 362,386 **** void set_keepalive(int s __attribute__ ((__unused__))) { ! #ifdef CAN_KEEPALIVE int keepalive = 1; ! #ifdef CAN_KEEPIDLE ! int keepidle = 900; #endif /* enable TCP keepalive */ if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *) &keepalive, sizeof(keepalive)) == -1) fprintf(stderr, "[%d] could not set SO_KEEPALIVE: errno %d", s, errno); ! #ifdef CAN_KEEPIDLE if (setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPALIVE: errno %d", s, errno); #endif #endif return; } ! /** Connect a socket, possibly making it nonblocking first. --- 362,394 ---- void set_keepalive(int s __attribute__ ((__unused__))) { ! #ifdef SO_KEEPALIVE int keepalive = 1; ! #if defined(TCP_KEEPIDLE) || defined(TCP_KEEPALIVE) ! int keepidle = options.keepalive_timeout; #endif /* enable TCP keepalive */ if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *) &keepalive, sizeof(keepalive)) == -1) fprintf(stderr, "[%d] could not set SO_KEEPALIVE: errno %d", s, errno); ! ! /* And set the ping time to something reasonable instead of the ! default 2 hours. Linux, NetBSD and o thers use TCP_KEEPIDLE to do ! this. OS X and possibly others use TCP_KEEPALIVE. */ ! #if defined(TCP_KEEPIDLE) if (setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, (void *) &keepidle, sizeof(keepidle)) == -1) + fprintf(stderr, "[%d] could not set TCP_KEEPIDLE: errno %d", s, errno); + #elif defined(TCP_KEEPALIVE) + if (setsockopt(s, IPPROTO_TCP, TCP_KEEPALIVE, + (void *) &keepidle, sizeof(keepidle)) == -1) fprintf(stderr, "[%d] could not set TCP_KEEPALIVE: errno %d", s, errno); #endif #endif return; } ! #endif /** Connect a socket, possibly making it nonblocking first. *** 1_8_1.275/win32/funs.h Tue, 31 Jan 2006 13:18:24 -0600 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8.2.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.8.1.3.1.7.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.10.1.1.1.4.1.5.1.1.1.1.1.10 640) --- 1_8_1.310(w)/win32/funs.h Sat, 25 Mar 2006 15:33:31 -0600 dunemush (pennmush/f/12_funs.h 1.11.1.9.2.8.2.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.8.1.3.1.7.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.10.1.1.1.4.1.5.1.1.1.1.1.10.1.5 640) *************** *** 57,62 **** --- 57,63 ---- FUNCTION_PROTO(fun_cos); FUNCTION_PROTO(fun_cowner); FUNCTION_PROTO(fun_create); + FUNCTION_PROTO(fun_crecall); FUNCTION_PROTO(fun_cstatus); FUNCTION_PROTO(fun_ctime); FUNCTION_PROTO(fun_ctitle); *************** *** 204,214 **** --- 205,217 ---- FUNCTION_PROTO(fun_name); FUNCTION_PROTO(fun_namegrab); FUNCTION_PROTO(fun_namegraball); + FUNCTION_PROTO(fun_namelist); FUNCTION_PROTO(fun_nand); FUNCTION_PROTO(fun_nattr); FUNCTION_PROTO(fun_nearby); FUNCTION_PROTO(fun_neq); FUNCTION_PROTO(fun_next); + FUNCTION_PROTO(fun_nextdbref); FUNCTION_PROTO(fun_nor); FUNCTION_PROTO(fun_not); FUNCTION_PROTO(fun_null); *************** *** 289,294 **** --- 292,298 ---- FUNCTION_PROTO(fun_soundex); FUNCTION_PROTO(fun_soundlike); FUNCTION_PROTO(fun_space); + FUNCTION_PROTO(fun_speak); FUNCTION_PROTO(fun_spellnum); FUNCTION_PROTO(fun_splice); FUNCTION_PROTO(fun_sql); *************** *** 327,334 **** --- 331,340 ---- FUNCTION_PROTO(fun_type); FUNCTION_PROTO(fun_ucstr); FUNCTION_PROTO(fun_ufun); + FUNCTION_PROTO(fun_ulambda); FUNCTION_PROTO(fun_uldefault); FUNCTION_PROTO(fun_ulocal); + FUNCTION_PROTO(fun_unique); FUNCTION_PROTO(fun_v); FUNCTION_PROTO(fun_vadd); FUNCTION_PROTO(fun_valid); *** 1_8_1.275/game/txt/hlp/pennvOLD.hlp Wed, 01 Feb 2006 09:11:46 -0600 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.2.1.5.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2 660) --- 1_8_1.310(w)/game/txt/hlp/pennvOLD.hlp Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/g/30_pennvOLD.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.2.1.5.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2 660) *************** *** 4417,4424 **** For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' ! 1.8.1: 0, 1, 2, 3, 4, 5, 6 ! 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 --- 4417,4424 ---- For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' ! 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7 ! 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 *** 1_8_1.275/game/txt/hlp/pennattr.hlp Thu, 20 Oct 2005 19:02:55 -0500 dunemush (pennmush/g/47_pennattr.h 1.7 600) --- 1_8_1.310(w)/game/txt/hlp/pennattr.hlp Fri, 10 Mar 2006 12:34:19 -0600 dunemush (pennmush/g/47_pennattr.h 1.8 600) *************** *** 29,35 **** & ATTR TREES2 & ATTRIB TREES2 & `2 - Attributes can be arranged in a hierarchical tree; these are called Attribute trees provide two immediate benefits. First, they reduce spam when examining objects. The usual * and ? wildcards for attributes do not match the ` character; the new ** wildcard does. Some --- 29,34 ---- *** 1_8_1.275/game/restrictcnf.dst Fri, 25 Feb 2005 14:08:34 -0600 dunemush (pennmush/h/10_restrictcn 1.6 600) --- 1_8_1.310(w)/game/restrictcnf.dst Sat, 25 Mar 2006 13:24:16 -0600 dunemush (pennmush/h/10_restrictcn 1.7 600) *************** *** 49,54 **** --- 49,57 ---- # @power is traditionally logged restrict_command @power logargs + # Prevent players going home while set FIXED + restrict_command home nofixed " You can't do that IC! + # Some additional protection against spam attacks by guests #restrict_command @dolist noguest #restrict_function repeat noguest *************** *** 118,121 **** #restrict_function mailtime nobody #restrict_function malias nobody #restrict_function folderstats nobody - --- 121,123 ---- *** 1_8_1.275/game/aliascnf.dst Sun, 08 Aug 2004 16:33:55 -0500 dunemush (pennmush/h/11_aliascnf.d 1.4 600) --- 1_8_1.310(w)/game/aliascnf.dst Fri, 10 Mar 2006 12:35:49 -0600 dunemush (pennmush/h/11_aliascnf.d 1.5 600) *************** *** 34,39 **** --- 34,41 ---- command_alias page p command_alias whisper w command_alias goto move + command_alias @atrlock @attrlock + command_alias @atrchown @attrchown # As well as commands, functions can be aliased. Same syntax, # just function_alias instead of command_alias. Note that many *************** *** 58,63 **** --- 60,66 ---- function_alias nvthings nvobjects function_alias xthings xobjects function_alias xvthings xvobjects + functoin_alias atrlock attrlock # For rhost compatibility function_alias textfile dynhelp *** 1_8_1.275/CHANGES.180 Sat, 25 Feb 2006 14:57:08 -0600 dunemush (pennmush/h/21_CHANGES.18 1.61 600) --- 1_8_1.310(w)/CHANGES.180 Mon, 10 Apr 2006 12:13:38 -0500 dunemush (pennmush/h/21_CHANGES.18 1.67 600) *************** *** 13,18 **** --- 13,37 ---- ========================================================================== + Version 1.8.0 patchlevel 12 March 25, 2006 + + Minor changes: + * New config option keepalive_timeout for setting the socket-level + are-you-there ping interval used to help work around broken routers. [SW] + * Changing the SO_KEEPALIVE interval works on more OSes, including OS X. [SW] + * Passwords are masked when commands that require them are logged + in command.log. Suggested by Sumta. [SW] + Fixes + * Added help entry for @debugforwardlist. Suggested by d'Ark@M*U*S*H. + * Help fixes by Talvo@M*U*S*H. + * When objects are nuked, their creation time is reset to 0. + This prevents garbage objects from maintaining the same objid. + Suggested by Cooee@PDX + * When doing english-style matching, plain numbers ('3') were + treated as adjectives (like '3rd') and shouldn't have been. + Fixed. Reported by Stinky@M*U*S*H. + + Version 1.8.0 patchlevel 11 February 25, 2006 Fixes: *** 1_8_1.275/game/txt/hlp/pennv180.hlp Sat, 25 Feb 2006 15:00:15 -0600 dunemush (pennmush/h/28_pennv180.h 1.1.1.2.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2 660) --- 1_8_1.310(w)/game/txt/hlp/pennv180.hlp Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/h/28_pennv180.h 1.1.1.2.1.1.1.2.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.1 660) *************** *** 1,3 **** --- 1,23 ---- + & 1.8.0p12 + Version 1.8.0 patchlevel 12 March 25, 2006 + + Minor changes: + * New config option keepalive_timeout for setting the socket-level + are-you-there ping interval used to help work around broken routers. [SW] + * Changing the SO_KEEPALIVE interval works on more OSes, including OS X. [SW] + * Passwords are masked when commands that require them are logged + in command.log. Suggested by Sumta. [SW] + Fixes + * Added help entry for @debugforwardlist. Suggested by d'Ark@M*U*S*H. + * Help fixes by Talvo@M*U*S*H. + * When objects are nuked, their creation time is reset to 0. + This prevents garbage objects from maintaining the same objid. + Suggested by Cooee@PDX + * When doing english-style matching, plain numbers ('3') were + treated as adjectives (like '3rd') and shouldn't have been. + Fixed. Reported by Stinky@M*U*S*H. + + & 1.8.0p11 Version 1.8.0 patchlevel 11 February 25, 2006 *** 1_8_1.275/game/txt/hlp/pennv181.hlp Wed, 01 Mar 2006 10:44:36 -0600 dunemush (pennmush/h/29_pennv181.h 1.105 660) --- 1_8_1.310(w)/game/txt/hlp/pennv181.hlp Mon, 10 Apr 2006 12:14:16 -0500 dunemush (pennmush/h/29_pennv181.h 1.121 660) *************** *** 1,4 **** ! & 1.8.1p6 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions --- 1,4 ---- ! & 1.8.1p7 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions *************** *** 11,16 **** --- 11,77 ---- A list of the patchlevels associated with each release can be read in 'help patchlevels'. + Version 1.8.1 patchlevel 7 March 21, 2006 + + Major changes: ** PLEASE READ ** + * The FIXED flag's restriction on 'home' is no longer applied in + the hardcode but through restrict.cnf. A new entry has been + added to restrictcnf.dst for this -- people running existing + MUSHes that use the FIXED flag will want to copy this to their + restrict.cnf. + Locks: + * @lock/take controls who may 'get' something from a container + or location; note that @lock/enter no longer controls this on + containers but only controls who may 'enter'. The container's + TAKE_LOCK`*FAILURE attributes provide messages on a failed get. + Suggested by BladedThoth@M*U*S*H. Patch by Talvo@M*U*S*H. + Commands: + * @chan/recall can take an extra argument to specify the line to + start the recall from. Suggested by Sholevi@M*U*S*H. Patch by + Talvo@M*U*S*H. + Functions: + * ulambda() is a version of u() that can take #lambdas. [GM] + * speak() for language processing. Suggested by Nymeria@M*U*S*H. + Patch by Talvo@M*U*S*H. [3] + * width() and height() take an optional second argument to set the + default values. Patch by Nathan Baum. + * unique() function removes contiguous duplicates in lists. [SW] + * nextdbref() returns the next dbref on the free list. + Patch by Talvo@M*U*S*H. + * Specifying more than one type to locate() now makes each of them + preferred (not just the last one). Suggested by Anyasha@ST:Foundations. + * namelist() parses a list of dbrefs and possibly-quoted names a la page + and returns the corresponding dbrefs. Patch by Talvo@M*U*S*H. + * crecall() is a functional form of @chan/recall. Suggestd by + Cheetah and Trinsec@M*U*S*H. Patch by Talvo@M*U*S*H. + Flags: + * The LIGHT flag now overrides the DARK flag consistently. DARK + objects will show up in LIGHT rooms and anything set both + LIGHT and DARK is effectively LIGHT. Suggested by Renee@ShoreSide. + Patch by Talvo@M*U*S*H. + Minor changes: + * @poll by itself now displays the current poll instead of clearing it. + @poll/clear does that. [SW] + * Added aliases for @atrlock/@atrchown/atrlock to 'attr' versions + in aliascnf.dst. Suggested by Talvo@M*U*S*H. + * Players who already have a forbidden name (as their name or alias) + may change to that name. Patch by Talvo@M*U*S*H. + * New alias_flag() and alias_power() hardcode functions for hackers. + Patch by Talvo@M*U*S*H. + * Mortals can use @power/list and @power commands. + Patch by Talvo@M*U*S*H. + * Restriction-checking by power fixed in cases where no flag + restrictions were applied. Patch by Talvo@M*U*S*H. + * New type GARBAGE for @search/lsearch type class. + * @pemit/list now accepts player names as well as dbrefs, a la page. + Patch by Talvo@M*U*S*H. + Fixes: + * pcre.c includes config.h again. [EEH]. + * Help fixes by Talvo@M*U*S*H. + * Fixes from 1.8.0p12 + + + & 1.8.1p6 Version 1.8.1 patchlevel 6 February 25, 2006 Major Changes: *** 1_8_1.275/CHANGES.181 Wed, 01 Mar 2006 10:44:36 -0600 dunemush (pennmush/h/30_CHANGES.18 1.101 600) --- 1_8_1.310(w)/CHANGES.181 Sat, 25 Mar 2006 15:25:27 -0600 dunemush (pennmush/h/30_CHANGES.18 1.117 600) *************** *** 14,19 **** --- 14,79 ---- ========================================================================== + Version 1.8.1 patchlevel 7 March 21, 2006 + + Major changes: ** PLEASE READ ** + * The FIXED flag's restriction on 'home' is no longer applied in + the hardcode but through restrict.cnf. A new entry has been + added to restrictcnf.dst for this -- people running existing + MUSHes that use the FIXED flag will want to copy this to their + restrict.cnf. + Locks: + * @lock/take controls who may 'get' something from a container + or location; note that @lock/enter no longer controls this on + containers but only controls who may 'enter'. The container's + TAKE_LOCK`*FAILURE attributes provide messages on a failed get. + Suggested by BladedThoth@M*U*S*H. Patch by Talvo@M*U*S*H. + Commands: + * @chan/recall can take an extra argument to specify the line to + start the recall from. Suggested by Sholevi@M*U*S*H. Patch by + Talvo@M*U*S*H. + Functions: + * ulambda() is a version of u() that can take #lambdas. [GM] + * speak() for language processing. Suggested by Nymeria@M*U*S*H. + Patch by Talvo@M*U*S*H. [3] + * width() and height() take an optional second argument to set the + default values. Patch by Nathan Baum. + * unique() function removes contiguous duplicates in lists. [SW] + * nextdbref() returns the next dbref on the free list. + Patch by Talvo@M*U*S*H. + * Specifying more than one type to locate() now makes each of them + preferred (not just the last one). Suggested by Anyasha@ST:Foundations. + * namelist() parses a list of dbrefs and possibly-quoted names a la page + and returns the corresponding dbrefs. Patch by Talvo@M*U*S*H. + * crecall() is a functional form of @chan/recall. Suggestd by + Cheetah and Trinsec@M*U*S*H. Patch by Talvo@M*U*S*H. + Flags: + * The LIGHT flag now overrides the DARK flag consistently. DARK + objects will show up in LIGHT rooms and anything set both + LIGHT and DARK is effectively LIGHT. Suggested by Renee@ShoreSide. + Patch by Talvo@M*U*S*H. + Minor changes: + * @poll by itself now displays the current poll instead of clearing it. + @poll/clear does that. [SW] + * Added aliases for @atrlock/@atrchown/atrlock to 'attr' versions + in aliascnf.dst. Suggested by Talvo@M*U*S*H. + * Players who already have a forbidden name (as their name or alias) + may change to that name. Patch by Talvo@M*U*S*H. + * New alias_flag() and alias_power() hardcode functions for hackers. + Patch by Talvo@M*U*S*H. + * Mortals can use @power/list and @power commands. + Patch by Talvo@M*U*S*H. + * Restriction-checking by power fixed in cases where no flag + restrictions were applied. Patch by Talvo@M*U*S*H. + * New type GARBAGE for @search/lsearch type class. + * @pemit/list now accepts player names as well as dbrefs, a la page. + Patch by Talvo@M*U*S*H. + Fixes: + * pcre.c includes config.h again. [EEH]. + * Help fixes by Talvo@M*U*S*H. + * Fixes from 1.8.0p12 + + Version 1.8.1 patchlevel 6 February 25, 2006 Major Changes: