This is patch05 to PennMUSH 1.8.1. After applying this patch, you will have version 1.8.1p5 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.8.1-patch05 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: * @attrib/access no longer treats one-word flag lists that don't match a single flag as a set of flag characters. You must now always specify a space-separated list of full flag names. Commands: * @list/locks and list(locks) lists all defined locktypes. Suggested by Jules@M*U*S*H, patch by Walker@M*U*S*H. * New @search classes 'start' (nth element of return list to start with) and 'count' (how many elements to show, from ). Useful for getting results a page at a time. Patch by Walker@M*U*S*H. Functions: * nsearch()/nlsearch()/nchildren() return the number of objects that would be returned by the equivalent search/lsearch/children call. Patch by Walker@M*U*S*H. Minor Changes: * delete() can use a negative length argument to delete characters leftward, a la MUX. [MUX, SW]. * In @mail commands, : is now recognized as meaning 'all messages in folder n'. Notably, @mail 3: now lists all messages in folder 3, rather than reading all messages in folder 3. Patch by Sketch@M*U*S*H. * When one alias in a list of aliases being set is invalid, we now report it with specificity. Suggested by Talvo@M*U*S*H. * You no longer need to escape commas in decompose(). Suggested by Trinsec@M*U*S*H. * @sitelock rules for Guest access can now be specified per-guest character. Suggested by Talvo@M*U*S*H. * process_expression now parses for regex pattern captures by default, so lots of things will work better under regedit(). Use of a ufun clears the captured registers so dollar signs in ufuns don't need escaping. Patch by Walker@M*U*S*H. * Refactoring of ufun code by Walker@M*U*S*H. Fixes: * Help fixes by Trinsec@M*U*S*H and Talvo@M*U*S*H and qa'toq@M*U*S*H. * Crash bug in page fixed. Reported by the fine folks at ST:Foundation. Patch by Walker@M*U*S*H. * Win32 portability fixes. [EEH] * Fixes from 1.8.0p10. Prereq: 1.8.1p4 *** 1_8_1.193/Patchlevel Tue, 06 Dec 2005 14:21:37 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.48 600) --- 1_8_1.215(w)/Patchlevel Sun, 29 Jan 2006 11:43:37 -0600 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.49 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.1p4 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.8.1p5 *** 1_8_1.193/game/txt/hlp/pennfunc.hlp Tue, 06 Dec 2005 14:21:37 -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.12 600) --- 1_8_1.215(w)/game/txt/hlp/pennfunc.hlp Fri, 13 Jan 2006 22:31:49 -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.18 600) *************** *** 914,924 **** Return a modified , with characters starting after the character at position deleted. In other words, it copies characters, skips characters>, and then copies the remainder of ! the string. ! ! Example: ! > say [delete(abcdefgh, 3, 2)] You say, "abcfgh" & DIE() die(, [, ]) --- 914,927 ---- Return a modified , with characters starting after the character at position deleted. In other words, it copies characters, skips characters>, and then copies the remainder of ! the string. If is negative, deletes characters leftwards from . ! Characters are numbered starting at 0. ! ! Examples: ! > say delete(abcdefgh, 3, 2) You say, "abcfgh" + > say delete(abcdefgh, 3, -2) + You say, "abefgh" & DIE() die(, [, ]) *************** *** 987,993 **** Note that add(mul(div(%0,%1),%1),remainder(%0,%1)) always yields %0, and add(mul(floordiv(%0,%1),%1),modulo(%0,%1)) also always yields %0. ! See also: MODULO & DOING() doing() --- 990,996 ---- Note that add(mul(div(%0,%1),%1),remainder(%0,%1)) always yields %0, and add(mul(floordiv(%0,%1),%1),modulo(%0,%1)) also always yields %0. ! See also: modulo(), fdiv() & DOING() doing() *************** *** 1198,1203 **** --- 1201,1208 ---- Returns the quotient of the two numbers. Note that the DIV() and MOD() functions cannot be used on floating point numbers. + + See also: div() & FILTER() & FILTERBOOL() filter([/], [,][,]) *************** *** 2137,2143 **** Given no arguments, this function returns a space-separated list of all flag names known to the server. ! See also: llockflags(), lset(), lock(), llocks() & LSET() lset(/,[!]) --- 2142,2148 ---- Given no arguments, this function returns a space-separated list of all flag names known to the server. ! See also: lockflags(), lset(), lock(), llocks() & LSET() lset(/,[!]) *************** *** 2189,2200 **** --- 2194,2210 ---- See also: pos() & LSEARCH() + & NLSEARCH() & SEARCH() + & NSEARCH() & LSEARCHR() & CHILDREN() + & NCHILDREN() lsearch([, ,...]) + nlsearch([, ,...]) lsearchr([, ,...]) children() + nchildren() This function is similar to the @search command, except it returns just a list of dbref numbers. It is computationally expensive, and *************** *** 2210,2215 **** --- 2220,2228 ---- children() is exactly the same as lsearch(,parent,), using "all" for See_All/Search_All players and "me" for others. + + nlsearch(...) and nchildren(...) return the count of results that + would be returned by lsearch() or children() with the same args. See 'help lsearch2' for more details. & LSEARCH2 *************** *** 2405,2411 **** Mid returns a segment of the string, the characters to the right of the character. Note that the first character in a ! string is numbered zero, and not one. & MIN() min(, , ..., ...) --- 2418,2434 ---- Mid returns a segment of the string, the characters to the right of the character. Note that the first character in a ! string is numbered zero, and not one. If is negative, it ! returns characters to the left of the character. The ! character is always part of the characters. ! ! Examples: ! > say mid(foobar, 2, 2) ! You say, "ob" ! > say mid(foobar, 2, -2) ! You say, "oo" ! ! See also: LEFT(), RIGHT() & MIN() min(, , ..., ...) *************** *** 2576,2589 **** & NAME() name([,]) - name([, ]) Name returns the name of object . For exits, name returns the displayed name of the exit. If function side effects are allowed, this function, given two arguments, ! acts just like @name =. Consequently, if renaming ! a player, you must use the player's password or be God. name() with no arguments currently returns nothing. This should be an error, but enough old code has been written that expects this behavior --- 2599,2610 ---- & NAME() name([,]) Name returns the name of object . For exits, name returns the displayed name of the exit. If function side effects are allowed, this function, given two arguments, ! acts just like @name =. name() with no arguments currently returns nothing. This should be an error, but enough old code has been written that expects this behavior *************** *** 3759,3764 **** --- 3780,3786 ---- @switch, while switch() and case() match more like @switch/first. See HELP SWITCH WILDCARDS for more, and HELP SWITCH2 for examples + See also: reswitch(), if() & SWITCH2 Examples of switch() and related functions: > say switch(test, *a*, foo, *b*, bar, *t*, neat, baz) *************** *** 3907,3913 **** See also: timefmt(), timestring(), convsecs(), convtime() & ETIMEFMT() ! etimefmt([, ]) This function is similar to timestring() - it formats an elapsed time into days, hours, minutes and seconds. However, its formatting is --- 3929,3935 ---- See also: timefmt(), timestring(), convsecs(), convtime() & ETIMEFMT() ! etimefmt(, ) This function is similar to timestring() - it formats an elapsed time into days, hours, minutes and seconds. However, its formatting is *** 1_8_1.193/game/txt/hlp/penncmd.hlp Thu, 03 Nov 2005 13:40:12 -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.6 600) --- 1_8_1.215(w)/game/txt/hlp/penncmd.hlp Fri, 13 Jan 2006 22:23:52 -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.10 600) *************** *** 396,402 **** Used without switches, @attribute shows info about a standard attrib. @attribute/access adds a new standard attribute into the table, ! associating it with the given space-separated list of flags. See 'help @set' for possible flags. A flag list of "none" removes all flag associations. If the /retroactive switch is added, the flags are assigned to every copy --- 396,402 ---- Used without switches, @attribute shows info about a standard attrib. @attribute/access adds a new standard attribute into the table, ! associating it with the given space-separated list of full flag names. See 'help @set' for possible flags. A flag list of "none" removes all flag associations. If the /retroactive switch is added, the flags are assigned to every copy *************** *** 954,960 **** object, its STARTUP attribute is triggered. If you @destroy a GOING object, it is purged immediately. ! Wizards may @nuke players. If the DESTROY_POSSESSION config option is set (see @config), destroying a player destroys all non-SAFE things the player owns, and @chowns SAFE things to God. If not, destroying a player @chowns all their objects to God. --- 954,960 ---- object, its STARTUP attribute is triggered. If you @destroy a GOING object, it is purged immediately. ! Wizards may @nuke players. If the destroy_possessions config option is set (see @config), destroying a player destroys all non-SAFE things the player owns, and @chowns SAFE things to God. If not, destroying a player @chowns all their objects to God. *************** *** 1813,1818 **** --- 1813,1819 ---- /functions : Alias for @config/functions, shows all functions /commands : Alias for @config/commands, shows all commands /attribs : Alias for @config/attribs, shows all standard attribs + /locks : Shows all global (non-user) locks. /flags : Alias for @flag/list, shows all flags /powers : Alias for @powers/list, shows all powers /lowercase : Show whatever you're showing in lowercase, rather than upper. *************** *** 2949,2954 **** --- 2950,2960 ---- higher will be listed. If =MAXDB, only objects with dbrefs of or lower will be listed. + If =START, then @search will start returning results at the + th result. + + If =COUNT, then @search will only return up to results. + For the class TYPE=PLAYER, and for PLAYER=, anyone may obtain information on any player. In all other cases, only wizards may obtain information about other players. This is computationally *** 1_8_1.193/game/txt/hlp/pennchat.hlp Wed, 09 Nov 2005 10:30:50 -0600 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.14 600) --- 1_8_1.215(w)/game/txt/hlp/pennchat.hlp Fri, 13 Jan 2006 21:44:19 -0600 dunemush (pennmush/19_pennchat.h 1.2.1.4.1.15 600) *************** *** 43,49 **** --- 43,51 ---- ambiguous partial channel name will produce an error. & @cemit + & @nscemit @cemit[/noisy][/noeval] = + @nscemit[/noisy][/noeval] = This command allows to be directly broadcasted to the players on . No channel-prefix is prepended unless the *************** *** 51,56 **** --- 53,61 ---- is not evaluated. This command is intended for use in writing extended chat systems. + @nscemit is a wizard-only version that does not include nospoof + information in broadcasts. + See also: chat & @channel @channel/list [] *** 1_8_1.193/src/SWITCHES Sun, 20 Mar 2005 14:08:29 -0600 dunemush (pennmush/b/22_SWITCHES 1.12.1.3.1.16.1.2 600) --- 1_8_1.215(w)/src/SWITCHES Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/b/22_SWITCHES 1.12.1.3.1.16.1.3 600) *************** *** 63,68 **** --- 63,69 ---- JOIN LETTER LIST + LOCKS LOWERCASE LSARGS ME *** 1_8_1.193/src/wiz.c Sat, 27 Aug 2005 12:48:07 -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.5 660) --- 1_8_1.215(w)/src/wiz.c Mon, 30 Jan 2006 14:06:17 -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) *************** *** 71,76 **** --- 71,79 ---- char name[BUFFER_LEN]; /**< Limit to those prefix-matching this name */ dbref low; /**< Limit to dbrefs here or higher */ dbref high; /**< Limit to dbrefs here or lower */ + int start; /**< Limited results: start at this one. */ + int count; /**< Limited results: return this many */ + int end; /**< Limited results: return until this one.*/ }; static int tport_dest_ok(dbref player, dbref victim, dbref dest); *************** *** 1306,1311 **** --- 1309,1315 ---- FUNCTION(fun_lsearch) { int nresults; + int return_count = 0; dbref *results = NULL; int rev = !strcmp(called_as, "LSEARCHR"); *************** *** 1314,1331 **** return; } ! if (!strcmp(called_as, "CHILDREN")) { const char *myargs[2]; myargs[0] = "PARENT"; myargs[1] = args[0]; nresults = raw_search(executor, NULL, 2, myargs, &results, pe_info); ! } else nresults = raw_search(executor, args[0], nargs - 1, (const char **) (args + 1), &results, pe_info); if (nresults < 0) { safe_str("#-1", buff, bp); } else if (nresults == 0) { notify(executor, T("Nothing found.")); } else { --- 1318,1343 ---- return; } ! if (called_as[0] == 'N') { ! /* Return the count, not the values */ ! return_count = 1; ! } ! ! if (!strcmp(called_as, "CHILDREN") || !strcmp(called_as, "NCHILDREN")) { const char *myargs[2]; myargs[0] = "PARENT"; myargs[1] = args[0]; nresults = raw_search(executor, NULL, 2, myargs, &results, pe_info); ! } else { nresults = raw_search(executor, args[0], nargs - 1, (const char **) (args + 1), &results, pe_info); + } if (nresults < 0) { safe_str("#-1", buff, bp); + } else if (return_count) { + safe_integer(nresults, buff, bp); } else if (nresults == 0) { notify(executor, T("Nothing found.")); } else { *************** *** 1793,1798 **** --- 1805,1812 ---- strcpy(spec->name, ""); spec->low = 0; spec->high = db_top - 1; + spec->start = 1; /* 1-indexed */ + spec->count = 0; is_wiz = Search_All(player) || See_All(player); /* set limits on who we search */ *************** *** 1898,1903 **** --- 1912,1929 ---- spec->type = TYPE_PLAYER; } else if (string_prefix("name", class)) { strcpy(spec->name, restriction); + } else if (string_prefix("start", class)) { + spec->start = parse_integer(restriction); + if (spec->start < 1) { + notify(player, T("Invalid start index")); + return -1; + } + } else if (string_prefix("count", class)) { + spec->count = parse_integer(restriction); + if (spec->count < 1) { + notify(player, T("Invalid count index")); + return -1; + } } else if (string_prefix("parent", class)) { if (!*restriction) { spec->parent = NOTHING; *************** *** 1967,1972 **** --- 1993,1999 ---- return -1; } } + spec->end = spec->start + spec->count; return 0; } *************** *** 1981,1986 **** --- 2008,2014 ---- int n; int is_wiz; struct search_spec spec; + int count = 0; /* make sure player has money to do the search */ if (!payfor(player, FIND_COST)) { *************** *** 2045,2050 **** --- 2073,2088 ---- if (!parse_boolean(tbuf1)) continue; } + + /* Only include the matching dbrefs from start to start+count */ + count++; + if (count < spec.start) { + continue; + } + if (spec.count && count >= spec.end) { + continue; + } + if (nresults >= result_size) { dbref *newresults; result_size *= 2; *** 1_8_1.193/src/utils.c Wed, 19 Jan 2005 21:29:18 -0600 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.27 660) --- 1_8_1.215(w)/src/utils.c Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.31 660) *************** *** 42,47 **** --- 42,48 ---- #include "flags.h" #include "dbdefs.h" #include "attrib.h" + #include "parse.h" #include "lock.h" #include "confmagic.h" *************** *** 165,170 **** --- 166,323 ---- } } + /** Given an attribute [/] pair (which may include #lambda), + * fetch its value, owner (thing), and pe_flags, and store in the struct + * pointed to by ufun + */ + int + fetch_ufun_attrib(char *attrname, dbref executor, ufun_attrib * ufun, + int accept_lambda) + { + ATTR *attrib; + dbref thing; + int pe_flags = PE_UDEFAULT; + + if (!ufun) + return 0; /* We should never NOT receive a ufun. */ + ufun->errmess = (char *) ""; + + /* find our object and attribute */ + if (accept_lambda) { + parse_anon_attrib(executor, attrname, &thing, &attrib); + } else { + parse_attrib(executor, attrname, &thing, &attrib); + } + + /* Is it valid? */ + if (!GoodObject(thing)) { + ufun->errmess = (char *) "#-1 INVALID OBJECT"; + free_anon_attrib(attrib); + return 0; + } else if (!attrib) { + ufun->contents[0] = '\0'; + ufun->thing = thing; + ufun->pe_flags = pe_flags; + free_anon_attrib(attrib); + return 1; + } else if (!Can_Read_Attr(executor, thing, attrib)) { + ufun->errmess = e_atrperm; + free_anon_attrib(attrib); + return 0; + } + + /* Can we evaluate it? */ + if (!CanEvalAttr(executor, thing, attrib)) { + ufun->errmess = e_perm; + free_anon_attrib(attrib); + return 0; + } + + /* DEBUG attributes */ + if (AF_Debug(attrib)) + pe_flags |= PE_DEBUG; + + /* Populate the ufun object */ + strncpy(ufun->contents, atr_value(attrib), BUFFER_LEN); + ufun->thing = thing; + ufun->pe_flags = pe_flags; + + /* Cleanup */ + free_anon_attrib(attrib); + + /* We're good */ + return 1; + } + + /** Given a ufun, executor, enactor, PE_Info, and arguments for %0-%9, + * call the ufun with appropriate permissions on values given for + * wenv_args. The value returned is stored in the buffer pointed to + * by retval, if given. + * \param ufun The ufun_attrib that was initialized by fetch_ufun_attrib + * \param wenv_args An array of string values for global_eval_context.wenv + * \param wenv_argc The number of wenv args to use. + * \param ret If desired, a pointer to a buffer in which the results + * of the process_expression are stored in. + * \param executor The executor. + * \param enactor The enactor. + * \param pe_info The pe_info passed to the FUNCTION + * \retval 0 success + * \retval 1 process_expression failed. (CPU time limit) + */ + int + call_ufun(ufun_attrib * ufun, char **wenv_args, int wenv_argc, char *ret, + dbref executor, dbref enactor, PE_Info * pe_info) + { + char rbuff[BUFFER_LEN]; + char *rp; + char *old_wenv[10]; + int old_args; + int i; + int pe_ret; + char const *ap; + + int old_re_subpatterns; + int *old_re_offsets; + char *old_re_from; + + old_re_subpatterns = global_eval_context.re_subpatterns; + old_re_offsets = global_eval_context.re_offsets; + old_re_from = global_eval_context.re_from; + + /* Make sure we have a ufun first */ + if (!ufun) + return 1; + + /* If the user doesn't care about the return of the expression, + * then use our own rbuff. + */ + if (!ret) + ret = rbuff; + rp = ret; + + for (i = 0; i < wenv_argc; i++) { + old_wenv[i] = global_eval_context.wenv[i]; + global_eval_context.wenv[i] = wenv_args[i]; + } + for (; i < 10; i++) { + old_wenv[i] = global_eval_context.wenv[i]; + global_eval_context.wenv[i] = NULL; + } + + /* Set all the regexp patterns to NULL so they are not + * propogated */ + global_eval_context.re_subpatterns = -1; + global_eval_context.re_offsets = NULL; + global_eval_context.re_from = NULL; + + + /* And now, make the call! =) */ + if (pe_info) { + old_args = pe_info->arg_count; + pe_info->arg_count = wenv_argc; + } + + ap = ufun->contents; + pe_ret = process_expression(ret, &rp, &ap, ufun->thing, executor, + enactor, ufun->pe_flags, PT_DEFAULT, pe_info); + *rp = '\0'; + + /* Restore the old wenv */ + for (i = 0; i < 10; i++) { + global_eval_context.wenv[i] = old_wenv[i]; + } + if (pe_info) { + pe_info->arg_count = old_args; + } + + /* Restore regexp patterns */ + global_eval_context.re_offsets = old_re_offsets; + global_eval_context.re_subpatterns = old_re_subpatterns; + global_eval_context.re_from = old_re_from; + + return pe_ret; + } + /** Given an exit, find the room that is its source through brute force. * This is used in pathological cases where the exit's own source * element is invalid. *** 1_8_1.193/src/privtab.c Mon, 27 Jun 2005 14:05:10 -0500 dunemush (pennmush/b/31_privtab.c 1.9 660) --- 1_8_1.215(w)/src/privtab.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/b/31_privtab.c 1.10 660) *************** *** 22,28 **** /** Convert a string to a set of privilege bits, masked by an original set. * Given a privs table, a string, and an original set of privileges, * return a modified set of privileges by applying the privs in the ! * string to the original set of privileges. * \param table pointer to a privtab. * \param str a space-separated string of privilege names to apply. * \param origprivs the original privileges. --- 22,30 ---- /** Convert a string to a set of privilege bits, masked by an original set. * Given a privs table, a string, and an original set of privileges, * return a modified set of privileges by applying the privs in the ! * string to the original set of privileges. IF A SINGLE WORD STRING ! * IS GIVEN AND IT ISN'T THE NAME OF A PRIV, PARSE IT AS INDIVIDUAL ! * PRIV CHARS. * \param table pointer to a privtab. * \param str a space-separated string of privilege names to apply. * \param origprivs the original privileges. *************** *** 83,88 **** --- 85,137 ---- return ((origprivs | yes) & ~no); } + /** Convert a list to a set of privilege bits, masked by an original set. + * Given a privs table, a list, and an original set of privileges, + * return a modified set of privileges by applying the privs in the + * string to the original set of privileges. No prefix-matching is + * permitted in this list. + * \param table pointer to a privtab. + * \param str a space-separated string of privilege names to apply. + * \param origprivs the original privileges. + * \return a privilege bitmask. + */ + int + list_to_privs(PRIV *table, const char *str, long int origprivs) + { + PRIV *c; + long int yes = 0; + long int no = 0; + char *p, *r; + char tbuf1[BUFFER_LEN]; + int not; + int words = 0; + + if (!str || !*str) + return origprivs; + strcpy(tbuf1, str); + r = trim_space_sep(tbuf1, ' '); + while ((p = split_token(&r, ' '))) { + words++; + not = 0; + if (*p == '!') { + not = 1; + if (!*++p) + continue; + } + for (c = table; c->name; c++) { + if (!strcasecmp(c->name, p)) { + if (not) + no |= c->bits_to_set; + else + yes |= c->bits_to_set; + break; + } + } + } + return ((origprivs | yes) & ~no); + } + + /** Convert a string to 2 sets of privilege bits, privs to set and * privs to clear. * \param table pointer to a privtab. *** 1_8_1.193/src/switchinc.c Wed, 08 Jun 2005 18:16:59 -0500 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.5.2.1.1.31.3.4.1.5.1.4.1.1.1.1.1.1.1.7.1.1.1.9.1.2 660) --- 1_8_1.215(w)/src/switchinc.c Mon, 30 Jan 2006 14:06:20 -0600 dunemush (pennmush/b/32_switchinc. 1.3.1.2.1.6.1.18.1.2.1.2.2.5.1.4.2.4.1.1.1.2.1.5.1.2.1.5.2.1.1.31.3.4.1.5.1.4.1.1.1.1.1.1.1.7.1.1.1.9.1.3 660) *************** *** 65,70 **** --- 65,71 ---- {"JOIN", SWITCH_JOIN}, {"LETTER", SWITCH_LETTER}, {"LIST", SWITCH_LIST}, + {"LOCKS", SWITCH_LOCKS}, {"LOWERCASE", SWITCH_LOWERCASE}, {"LSARGS", SWITCH_LSARGS}, {"ME", SWITCH_ME}, *** 1_8_1.193/src/player.c Sat, 04 Jun 2005 22:07:51 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.15.1.2 660) --- 1_8_1.215(w)/src/player.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.15.1.3 660) *************** *** 138,144 **** host, ip); return NOTHING; } ! if (Guest(player) && (!Site_Can_Guest(host) || !Site_Can_Guest(ip))) { if (!Deny_Silent_Site(host, AMBIGUOUS) && !Deny_Silent_Site(ip, AMBIGUOUS)) { do_log(LT_CONN, 0, 0, T("Connection to %s (GUEST) not allowed from %s (%s)"), name, --- 138,145 ---- host, ip); return NOTHING; } ! if (Guest(player) ! && (!Site_Can_Guest(host, player) || !Site_Can_Guest(ip, player))) { if (!Deny_Silent_Site(host, AMBIGUOUS) && !Deny_Silent_Site(ip, AMBIGUOUS)) { do_log(LT_CONN, 0, 0, T("Connection to %s (GUEST) not allowed from %s (%s)"), name, *** 1_8_1.193/src/parse.c Wed, 14 Sep 2005 22:51:09 -0500 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.2.1.41.1.6 660) --- 1_8_1.215(w)/src/parse.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.2.1.41.1.7 660) *************** *** 37,45 **** extern int inum, inum_limit; int global_fun_invocations; int global_fun_recursions; ! extern int re_subpatterns; ! extern int *re_offsets; ! extern char *re_from; extern sig_atomic_t cpu_time_limit_hit; extern int cpu_limit_warning_sent; --- 37,45 ---- extern int inum, inum_limit; int global_fun_invocations; int global_fun_recursions; ! /* extern int re_subpatterns; */ ! /* extern int *re_offsets; */ ! /* extern char *re_from; */ extern sig_atomic_t cpu_time_limit_hit; extern int cpu_limit_warning_sent; *************** *** 642,651 **** } break; case '$': /* Dollar subs for regedit() */ ! if ((eflags & (PE_DOLLAR | PE_EVALUATE)) != (PE_DOLLAR | PE_EVALUATE)) { ! safe_chr('$', buff, bp); ! (*str)++; ! } else { char obuf[BUFFER_LEN]; int p = 0; --- 642,649 ---- } break; case '$': /* Dollar subs for regedit() */ ! if ((eflags & (PE_DOLLAR | PE_EVALUATE)) == (PE_DOLLAR | PE_EVALUATE) && ! global_eval_context.re_subpatterns >= 0) { char obuf[BUFFER_LEN]; int p = 0; *************** *** 658,673 **** p *= 10; p += **str - '0'; (*str)++; } ! } else break; ! if (p >= re_subpatterns || re_offsets == NULL || re_from == NULL) break; ! pcre_copy_substring(re_from, re_offsets, re_subpatterns, p, obuf, ! BUFFER_LEN); safe_str(obuf, buff, bp); } break; case '%': /* Percent substitutions */ --- 656,689 ---- p *= 10; p += **str - '0'; (*str)++; + if (isdigit((unsigned char) **str)) { + /* More than 100. Treat this as literal. */ + safe_chr('$', buff, bp); + safe_number(p, buff, bp); + } } ! } else { ! safe_chr('$', buff, bp); break; + } ! if (p >= global_eval_context.re_subpatterns || ! global_eval_context.re_offsets == NULL || ! global_eval_context.re_from == NULL) { ! /* It's out of bounds, return */ ! safe_chr('$', buff, bp); ! safe_number(p, buff, bp); break; + } ! pcre_copy_substring(global_eval_context.re_from, ! global_eval_context.re_offsets, ! global_eval_context.re_subpatterns, ! p, obuf, BUFFER_LEN); safe_str(obuf, buff, bp); + } else { + safe_chr('$', buff, bp); + (*str)++; } break; case '%': /* Percent substitutions */ *** 1_8_1.193/src/lock.c Sat, 27 Aug 2005 11:04:47 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.23.1.1.1.2 660) --- 1_8_1.215(w)/src/lock.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.23.1.1.1.3 660) *************** *** 110,115 **** --- 110,116 ---- {NULL, TRUE_BOOLEXP, GOD, 0, NULL} }; + /** Table of base attributes associated with success and failure of * locks. These are the historical ones; we automatically generate * such attribute names for those that aren't in this table using *************** *** 150,155 **** --- 151,205 ---- static lock_list *next_free_lock(void); static void free_lock(lock_list *ll); + /** Return a list of all available locks + * \param buff the buffer + * \param bp a pointer to the current position in the buffer. + */ + void + list_locks(char *buff, char **bp, const char *name) + { + char rbuff[BUFFER_LEN]; + char *rp; + int first = 1; + const lock_list *ptr; + rp = rbuff; + for (ptr = lock_types; ptr->type != NULL; ptr++) { + /* Skip those that don't match */ + if (name && !string_prefix(ptr->type, name)) + continue; + if (first) { + first = 0; + } else { + safe_chr(' ', rbuff, &rp); + } + safe_str(ptr->type, rbuff, &rp); + } + *rp = '\0'; + /* We strupper it for consistency with the other + * @list/foo and list(foo)s. */ + safe_str(strupper(rbuff), buff, bp); + } + + /** User interface to list locks. + * \verbatim + * This function implements @list/locks. + * \endverbatim + * \param player the enactor. + * \param arg wildcard pattern of flag names to list, or NULL for all. + * \param lc if 1, list flags in lowercase. + * \param label label to prefix to list. + */ + void + do_list_locks(dbref player, const char *arg, int lc, const char *label) + { + char buff[BUFFER_LEN]; + char *bp = buff; + list_locks(buff, &bp, arg); + *bp = '\0'; + notify_format(player, "%s: %s", label, lc ? strlower(buff) : buff); + } + + /** Return a list of lock flag characters. * \param ll pointer to a lock. * \return string of lock flag characters. *** 1_8_1.193/src/game.c Mon, 31 Oct 2005 12:04:33 -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.6 660) --- 1_8_1.215(w)/src/game.c Mon, 30 Jan 2006 14:06:16 -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.7 660) *************** *** 660,665 **** --- 660,670 ---- for (j = 0; j < NUMQ; j++) global_eval_context.rnxt[j] = NULL; + /* Initialize the regexp patterns to nothing */ + global_eval_context.re_subpatterns = -1; + global_eval_context.re_offsets = NULL; + global_eval_context.re_from = NULL; + for (thing = 0; thing < db_top; thing++) { if (Name(thing) == NULL) { if (IsGarbage(thing)) *** 1_8_1.193/src/funufun.c Sat, 27 Aug 2005 13:12:37 -0500 dunemush (pennmush/c/11_funufun.c 1.24 660) --- 1_8_1.215(w)/src/funufun.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/c/11_funufun.c 1.25 660) *************** *** 145,171 **** /* ARGSUSED */ FUNCTION(fun_ufun) { ! ATTR *attrib; ! dbref obj; ! /* find the user function attribute */ ! parse_attrib(executor, args[0], &obj, &attrib); ! if (!GoodObject(obj)) { ! safe_str(T("#-1 INVALID OBJECT"), buff, bp); ! return; ! } ! if (attrib && Can_Read_Attr(executor, obj, attrib)) { ! if (!CanEvalAttr(executor, obj, attrib)) { ! safe_str(T(e_perm), buff, bp); ! return; ! } ! do_userfn(buff, bp, obj, attrib, nargs - 1, args + 1, executor, caller, ! enactor, pe_info); ! return; ! } else if (attrib || !Can_Examine(executor, obj)) { ! safe_str(T(e_atrperm), buff, bp); return; } return; } --- 145,162 ---- /* ARGSUSED */ FUNCTION(fun_ufun) { ! char rbuff[BUFFER_LEN]; ! ufun_attrib ufun; ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 0)) { ! 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; } *************** *** 175,204 **** /* Like fun_ufun, but saves the state of the q0-q9 registers * when called */ - ATTR *attrib; - dbref obj; char *preserve[NUMQ]; ! /* find the user function attribute */ ! parse_attrib(executor, args[0], &obj, &attrib); ! if (!GoodObject(obj)) { ! safe_str(T("#-1 INVALID OBJECT"), buff, bp); ! return; ! } ! if (attrib && Can_Read_Attr(executor, obj, attrib)) { ! if (!CanEvalAttr(executor, obj, attrib)) { ! safe_str(T(e_perm), buff, bp); ! return; ! } ! save_global_regs("ulocal.save", preserve); ! do_userfn(buff, bp, obj, attrib, nargs - 1, args + 1, executor, caller, ! enactor, pe_info); ! restore_global_regs("ulocal.save", preserve); ! return; ! } else if (attrib || !Can_Examine(executor, obj)) { ! safe_str(T(e_atrperm), buff, bp); return; } return; } --- 166,188 ---- /* Like fun_ufun, but saves the state of the q0-q9 registers * when called */ char *preserve[NUMQ]; + char rbuff[BUFFER_LEN]; + ufun_attrib ufun; ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 0)) { ! safe_str(T(ufun.errmess), buff, bp); return; } + + /* Save global regs */ + save_global_regs("ulocal.save", preserve); + + call_ufun(&ufun, args + 1, nargs - 1, rbuff, executor, enactor, pe_info); + safe_str(rbuff, buff, bp); + + restore_global_regs("ulocal.save", preserve); + return; } *** 1_8_1.193/src/funstr.c Thu, 10 Nov 2005 09:37:07 -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.33 660) --- 1_8_1.215(w)/src/funstr.c Mon, 30 Jan 2006 14:06:16 -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) *************** *** 301,312 **** pos = parse_integer(args[1]); len = parse_integer(args[2]); ! if ((pos < 0) || (len < 0)) { safe_str(T(e_range), buff, bp); free_ansi_string(as); return; } safe_ansi_string(as, pos, len, buff, bp); free_ansi_string(as); } --- 301,319 ---- pos = parse_integer(args[1]); len = parse_integer(args[2]); ! if (pos < 0) { safe_str(T(e_range), buff, bp); free_ansi_string(as); return; } + if (len < 0) { + pos = pos + len + 1; + if (pos < 0) + pos = 0; + len = -len; + } + safe_ansi_string(as, pos, len, buff, bp); free_ansi_string(as); } *************** *** 397,404 **** FUNCTION(fun_delete) { ansi_string *as; ! int pos, num; ! if (!is_integer(args[1]) || !is_integer(args[2])) { safe_str(T(e_ints), buff, bp); --- 404,410 ---- FUNCTION(fun_delete) { ansi_string *as; ! int pos, pos2, num; if (!is_integer(args[1]) || !is_integer(args[2])) { safe_str(T(e_ints), buff, bp); *************** *** 415,428 **** as = parse_ansi_string(args[0]); ! if ((size_t) pos > as->len || num <= 0) { safe_strl(args[0], arglens[0], buff, bp); free_ansi_string(as); return; } safe_ansi_string(as, 0, pos, buff, bp); ! safe_ansi_string(as, pos + num, as->len, buff, bp); free_ansi_string(as); } --- 421,444 ---- as = parse_ansi_string(args[0]); ! if ((size_t) pos > as->len || num == 0) { safe_strl(args[0], arglens[0], buff, bp); free_ansi_string(as); return; } + if (num < 0) { + pos2 = pos + 1; + pos = pos2 + num; + if (pos < 0) + pos = 0; + } else + pos2 = pos + num; + + + safe_ansi_string(as, 0, pos, buff, bp); ! safe_ansi_string(as, pos2, as->len, buff, bp); free_ansi_string(as); } *** 1_8_1.193/src/funmisc.c Tue, 06 Dec 2005 14:21:37 -0600 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.41.1.10 660) --- 1_8_1.215(w)/src/funmisc.c Mon, 30 Jan 2006 14:06:15 -0600 dunemush (pennmush/c/14_funmisc.c 1.30.1.1.1.41.1.12 660) *************** *** 17,22 **** --- 17,23 ---- #include "version.h" #include "htab.h" #include "flags.h" + #include "lock.h" #include "match.h" #include "mushdb.h" #include "dbdefs.h" *************** *** 609,614 **** --- 610,617 ---- safe_str(list_commands(), buff, bp); else if (string_prefix("attribs", args[0])) safe_str(list_attribs(), buff, bp); + else if (string_prefix("locks", args[0])) + list_locks(buff, bp, NULL); else if (string_prefix("flags", args[0])) safe_str(list_all_flags("FLAG", "", executor, 0x3), buff, bp); else if (string_prefix("powers", args[0])) *** 1_8_1.193/src/funlist.c Mon, 17 Oct 2005 15:35:58 -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.7 660) --- 1_8_1.215(w)/src/funlist.c Mon, 30 Jan 2006 14:06:15 -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.9 660) *************** *** 374,462 **** * can provide a starting point. */ ! dbref thing; ! ATTR *attrib; ! char const *ap; ! char *abuf, *result, *rp, *rsave; char *cp; ! char *tptr[2]; char sep; int funccount, per; ! int pe_flags = PE_DEFAULT; if (!delim_check(buff, bp, nargs, args, 4, &sep)) return; ! /* find our object and attribute */ ! parse_anon_attrib(executor, args[0], &thing, &attrib); ! ! if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { ! free_anon_attrib(attrib); return; - } - if (!CanEvalAttr(executor, thing, attrib)) { - free_anon_attrib(attrib); - return; - } - - /* Now we can go to work */ - if (AF_Debug(attrib)) - pe_flags |= PE_DEBUG; - result = (char *) mush_malloc(BUFFER_LEN, "string"); - rsave = (char *) mush_malloc(BUFFER_LEN, "string"); - if (!result || !rsave) - mush_panic("Unable to allocate memory in fun_fold"); - - abuf = safe_atr_value(attrib); - - /* save our stack */ - tptr[0] = global_eval_context.wenv[0]; - tptr[1] = global_eval_context.wenv[1]; cp = args[1]; /* If we have three or more arguments, the third one is the base case */ if (nargs >= 3) { ! global_eval_context.wenv[0] = args[2]; ! global_eval_context.wenv[1] = split_token(&cp, sep); } else { ! global_eval_context.wenv[0] = split_token(&cp, sep); ! global_eval_context.wenv[1] = split_token(&cp, sep); } ! rp = result; ! ap = abuf; ! process_expression(result, &rp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info); ! *rp = '\0'; ! strcpy(rsave, result); funccount = pe_info->fun_invocations; /* handle the rest of the cases */ while (cp && *cp) { ! global_eval_context.wenv[0] = rsave; ! global_eval_context.wenv[1] = split_token(&cp, sep); ! rp = result; ! ap = abuf; ! per = process_expression(result, &rp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info); ! *rp = '\0'; if (per || (pe_info->fun_invocations >= FUNCTION_LIMIT && ! pe_info->fun_invocations == funccount && ! !strcmp(rsave, result))) break; funccount = pe_info->fun_invocations; ! strcpy(rsave, result); } ! safe_str(rsave, buff, bp); ! ! /* restore the stack */ ! global_eval_context.wenv[0] = tptr[0]; ! global_eval_context.wenv[1] = tptr[1]; ! ! free((Malloc_t) abuf); ! mush_free((Malloc_t) result, "string"); ! mush_free((Malloc_t) rsave, "string"); ! free_anon_attrib(attrib); } /* ARGSUSED */ --- 374,421 ---- * can provide a starting point. */ ! ufun_attrib ufun; char *cp; ! char *wenv[2]; char sep; int funccount, per; ! char base[BUFFER_LEN]; ! char result[BUFFER_LEN]; if (!delim_check(buff, bp, nargs, args, 4, &sep)) return; ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) return; cp = args[1]; /* If we have three or more arguments, the third one is the base case */ if (nargs >= 3) { ! strncpy(base, args[2], BUFFER_LEN); } else { ! strncpy(base, split_token(&cp, sep), BUFFER_LEN); } ! wenv[0] = base; ! wenv[1] = split_token(&cp, sep); ! ! call_ufun(&ufun, wenv, 2, result, executor, enactor, pe_info); ! ! strncpy(base, result, BUFFER_LEN); ! funccount = pe_info->fun_invocations; /* handle the rest of the cases */ while (cp && *cp) { ! wenv[1] = split_token(&cp, sep); ! per = call_ufun(&ufun, wenv, 2, result, executor, enactor, pe_info); if (per || (pe_info->fun_invocations >= FUNCTION_LIMIT && ! pe_info->fun_invocations == funccount && !strcmp(base, result))) break; funccount = pe_info->fun_invocations; ! strcpy(base, result); } ! safe_str(base, buff, bp); } /* ARGSUSED */ *************** *** 518,579 **** * of the list for which the function evaluates to 1. */ ! dbref thing; ! ATTR *attrib; ! char const *ap; ! char *abuf, result[BUFFER_LEN], *rp; char *cp; ! char *tptr; char sep; int first; int check_bool = 0; int funccount; char *osep, osepd[2] = { '\0', '\0' }; - int pe_flags = PE_DEFAULT; if (!delim_check(buff, bp, nargs, args, 3, &sep)) return; ! if (nargs == 4) ! osep = args[3]; ! else { ! osepd[0] = sep; ! osep = osepd; ! } if (strcmp(called_as, "FILTERBOOL") == 0) check_bool = 1; /* find our object and attribute */ ! parse_anon_attrib(executor, args[0], &thing, &attrib); ! ! if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { ! free_anon_attrib(attrib); return; - } - if (!CanEvalAttr(executor, thing, attrib)) { - free_anon_attrib(attrib); - return; - } - - if (AF_Debug(attrib)) - pe_flags |= PE_DEBUG; - - abuf = safe_atr_value(attrib); - - tptr = global_eval_context.wenv[0]; cp = trim_space_sep(args[1], sep); first = 1; funccount = pe_info->fun_invocations; while (cp && *cp) { ! global_eval_context.wenv[0] = split_token(&cp, sep); ! ap = abuf; ! rp = result; ! if (process_expression(result, &rp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info)) break; - *rp = '\0'; if ((check_bool == 0) ? (*result == '1' && *(result + 1) == '\0') : parse_boolean(result)) { --- 477,513 ---- * of the list for which the function evaluates to 1. */ ! ufun_attrib ufun; ! char result[BUFFER_LEN]; char *cp; ! char *wenv[1]; char sep; int first; int check_bool = 0; int funccount; char *osep, osepd[2] = { '\0', '\0' }; if (!delim_check(buff, bp, nargs, args, 3, &sep)) return; ! osepd[0] = sep; ! osep = (nargs >= 4) ? args[3] : osepd; if (strcmp(called_as, "FILTERBOOL") == 0) check_bool = 1; /* find our object and attribute */ ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) return; + /* Go through each argument */ cp = trim_space_sep(args[1], sep); first = 1; funccount = pe_info->fun_invocations; while (cp && *cp) { ! wenv[0] = split_token(&cp, sep); ! if (call_ufun(&ufun, wenv, 1, result, executor, enactor, pe_info)) break; if ((check_bool == 0) ? (*result == '1' && *(result + 1) == '\0') : parse_boolean(result)) { *************** *** 581,587 **** first = 0; else safe_str(osep, buff, bp); ! safe_str(global_eval_context.wenv[0], buff, bp); } /* Can't do *bp == oldbp like in all the others, because bp might not * move even when not full, if one of the list elements is null and --- 515,521 ---- first = 0; else safe_str(osep, buff, bp); ! safe_str(wenv[0], buff, bp); } /* Can't do *bp == oldbp like in all the others, because bp might not * move even when not full, if one of the list elements is null and *************** *** 590,600 **** break; funccount = pe_info->fun_invocations; } - - global_eval_context.wenv[0] = tptr; - - free((Malloc_t) abuf); - free_anon_attrib(attrib); } /* ARGSUSED */ --- 524,529 ---- *************** *** 2759,2836 **** * This function takes delimiters. */ ! dbref thing; ! ATTR *attrib; ! char const *ap; ! char *asave, *lp; ! char *tptr[2]; char place[16]; int placenr = 1; char sep; int funccount; - char *oldbp; char *osep, osepd[2] = { '\0', '\0' }; ! int pe_flags = PE_DEFAULT; if (!delim_check(buff, bp, nargs, args, 3, &sep)) return; ! if (nargs == 4) ! osep = args[3]; ! else { ! osepd[0] = sep; ! osep = osepd; ! } lp = trim_space_sep(args[1], sep); if (!*lp) return; ! /* find our object and attribute */ ! parse_anon_attrib(executor, args[0], &thing, &attrib); ! if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { ! free_anon_attrib(attrib); ! return; ! } ! if (!CanEvalAttr(executor, thing, attrib)) { ! free_anon_attrib(attrib); return; - } - if (AF_Debug(attrib)) - pe_flags |= PE_DEBUG; strcpy(place, "1"); - asave = safe_atr_value(attrib); ! /* save our stack */ ! tptr[0] = global_eval_context.wenv[0]; ! tptr[1] = global_eval_context.wenv[1]; ! global_eval_context.wenv[1] = place; ! global_eval_context.wenv[0] = split_token(&lp, sep); ! ap = asave; ! process_expression(buff, bp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info); ! oldbp = *bp; funccount = pe_info->fun_invocations; while (lp) { safe_str(osep, buff, bp); strcpy(place, unparse_integer(++placenr)); ! global_eval_context.wenv[0] = split_token(&lp, sep); ! ap = asave; ! if (process_expression(buff, bp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info)) break; if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) break; - oldbp = *bp; funccount = pe_info->fun_invocations; } - - free((Malloc_t) asave); - free_anon_attrib(attrib); - global_eval_context.wenv[0] = tptr[0]; - global_eval_context.wenv[1] = tptr[1]; } --- 2688,2737 ---- * This function takes delimiters. */ ! ufun_attrib ufun; ! char *lp; ! char *wenv[2]; char place[16]; int placenr = 1; char sep; int funccount; char *osep, osepd[2] = { '\0', '\0' }; ! char rbuff[BUFFER_LEN]; if (!delim_check(buff, bp, nargs, args, 3, &sep)) return; ! osepd[0] = sep; ! osep = (nargs >= 4) ? args[3] : osepd; lp = trim_space_sep(args[1], sep); if (!*lp) return; ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) return; strcpy(place, "1"); ! /* Build our %0 args */ ! wenv[0] = split_token(&lp, sep); ! wenv[1] = place; ! call_ufun(&ufun, wenv, 2, rbuff, executor, enactor, pe_info); funccount = pe_info->fun_invocations; + safe_str(rbuff, buff, bp); while (lp) { safe_str(osep, buff, bp); strcpy(place, unparse_integer(++placenr)); ! wenv[0] = split_token(&lp, sep); ! ! if (call_ufun(&ufun, wenv, 2, rbuff, executor, enactor, pe_info)) break; + safe_str(rbuff, buff, bp); if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) break; funccount = pe_info->fun_invocations; } } *************** *** 2842,2858 **** * This function takes delimiters. */ ! dbref thing; ! ATTR *attrib; ! char const *ap; ! char *asave, *lp[10]; ! char *tptr[10]; char sep; int funccount; int n; int lists, words; ! char *oldbp; ! int pe_flags = PE_DEFAULT; if (nargs > 3) { /* Last arg must be the delimiter */ n = nargs; --- 2743,2757 ---- * This function takes delimiters. */ ! ufun_attrib ufun; ! char rbuff[BUFFER_LEN]; ! char *lp[10]; ! char *list[10]; char sep; int funccount; int n; int lists, words; ! int first = 1; if (nargs > 3) { /* Last arg must be the delimiter */ n = nargs; *************** *** 2869,2937 **** lp[n] = trim_space_sep(args[n + 1], sep); /* find our object and attribute */ ! parse_anon_attrib(executor, args[0], &thing, &attrib); ! if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { ! free_anon_attrib(attrib); return; - } - if (!CanEvalAttr(executor, thing, attrib)) { - free_anon_attrib(attrib); - return; - } - if (AF_Debug(attrib)) - pe_flags |= PE_DEBUG; ! asave = safe_atr_value(attrib); ! ! /* save our stack */ ! save_global_env("fun_mix", tptr); ! ! words = 0; ! for (n = 0; n < 10; n++) { ! if ((n < lists) && lp[n] && *lp[n]) { ! global_eval_context.wenv[n] = split_token(&lp[n], sep); ! if (global_eval_context.wenv[n]) ! words++; ! } else ! global_eval_context.wenv[n] = NULL; ! } ! if (words == 0) { ! restore_global_env("fun_mix", tptr); ! free((Malloc_t) asave); ! free_anon_attrib(attrib); ! return; ! } ! ap = asave; ! process_expression(buff, bp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info); ! oldbp = *bp; ! funccount = pe_info->fun_invocations; while (1) { words = 0; ! for (n = 0; n < 10; n++) { ! if ((n < lists) && lp[n] && *lp[n]) { ! global_eval_context.wenv[n] = split_token(&lp[n], sep); ! if (global_eval_context.wenv[n]) words++; ! } else ! global_eval_context.wenv[n] = NULL; } ! if (words == 0) ! break; ! safe_chr(sep, buff, bp); ! ap = asave; ! if (process_expression(buff, bp, &ap, thing, executor, enactor, ! pe_flags, PT_DEFAULT, pe_info)) ! break; ! if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) ! break; ! oldbp = *bp; funccount = pe_info->fun_invocations; } - - free((Malloc_t) asave); - free_anon_attrib(attrib); - restore_global_env("fun_mix", tptr); } /* ARGSUSED */ --- 2768,2798 ---- lp[n] = trim_space_sep(args[n + 1], sep); /* find our object and attribute */ ! if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) return; ! first = 0; while (1) { words = 0; ! for (n = 0; n < lists; n++) { ! if (lp[n] && *lp[n]) { ! list[n] = split_token(&lp[n], sep); ! if (list[n]) words++; ! } else { ! list[n] = NULL; ! } } ! if (!words) ! return; ! if (first) ! first = 0; ! else ! safe_chr(sep, buff, bp); funccount = pe_info->fun_invocations; + call_ufun(&ufun, list, lists, rbuff, executor, enactor, pe_info); + safe_str(rbuff, buff, bp); } } /* ARGSUSED */ *************** *** 3043,3051 **** /* string, regexp, replacement string. Acts like sed or perl's s///g, * with an ig version */ ! int re_subpatterns = -1; /**< Number of subpatterns in regexp */ ! int *re_offsets; /**< Array of offsets to subpatterns */ ! char *re_from = NULL; /**< Pointer to last match position */ FUNCTION(fun_regreplace) { pcre *re; --- 2904,2912 ---- /* string, regexp, replacement string. Acts like sed or perl's s///g, * with an ig version */ ! // int re_subpatterns = -1; /**< Number of subpatterns in regexp */ ! // int *re_offsets; /**< Array of offsets to subpatterns */ ! // char *re_from = NULL; /**< Pointer to last match position */ FUNCTION(fun_regreplace) { pcre *re; *************** *** 3061,3066 **** --- 2922,2935 ---- char prebuf[BUFFER_LEN], *prep; char postbuf[BUFFER_LEN], *postp; + int old_re_subpatterns; + int *old_re_offsets; + char *old_re_from; + + old_re_subpatterns = global_eval_context.re_subpatterns; + old_re_offsets = global_eval_context.re_offsets; + old_re_from = global_eval_context.re_from; + int flags = 0, all = 0, match_offset = 0, len, funccount; int i; *************** *** 3138,3146 **** /* Now copy in the replacement, putting in captured sub-expressions */ obp = args[i + 1]; ! re_from = prebuf; ! re_offsets = offsets; ! re_subpatterns = subpatterns; process_expression(postbuf, &postp, &obp, executor, caller, enactor, PE_DEFAULT | PE_DOLLAR, PT_DEFAULT, pe_info); if ((*bp == (buff + BUFFER_LEN - 1)) --- 3007,3015 ---- /* Now copy in the replacement, putting in captured sub-expressions */ obp = args[i + 1]; ! global_eval_context.re_from = prebuf; ! global_eval_context.re_offsets = offsets; ! global_eval_context.re_subpatterns = subpatterns; process_expression(postbuf, &postp, &obp, executor, caller, enactor, PE_DEFAULT | PE_DOLLAR, PT_DEFAULT, pe_info); if ((*bp == (buff + BUFFER_LEN - 1)) *************** *** 3168,3176 **** if (study) mush_free((Malloc_t) study, "pcre.extra"); ! re_offsets = NULL; ! re_subpatterns = -1; ! re_from = NULL; } safe_str(postbuf, buff, bp); --- 3037,3045 ---- if (study) mush_free((Malloc_t) study, "pcre.extra"); ! global_eval_context.re_offsets = old_re_offsets; ! global_eval_context.re_subpatterns = old_re_subpatterns; ! global_eval_context.re_from = old_re_from; } safe_str(postbuf, buff, bp); *** 1_8_1.193/src/function.c Tue, 06 Dec 2005 14:27:01 -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.14 660) --- 1_8_1.215(w)/src/function.c Mon, 30 Jan 2006 14:06:15 -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.16 660) *************** *** 333,339 **** {"CREATE", fun_create, 1, 2, FN_REG}, {"CTIME", fun_ctime, 1, 1, FN_REG}, {"DEC", fun_dec, 1, 1, FN_REG}, ! {"DECOMPOSE", fun_decompose, 1, 1, FN_REG}, {"DECRYPT", fun_decrypt, 2, 2, FN_REG}, {"DEFAULT", fun_default, 2, 2, FN_NOPARSE}, {"DELETE", fun_delete, 3, 3, FN_REG}, --- 333,339 ---- {"CREATE", fun_create, 1, 2, FN_REG}, {"CTIME", fun_ctime, 1, 1, FN_REG}, {"DEC", fun_dec, 1, 1, FN_REG}, ! {"DECOMPOSE", fun_decompose, 1, -1, FN_REG}, {"DECRYPT", fun_decrypt, 2, 2, FN_REG}, {"DEFAULT", fun_default, 2, 2, FN_NOPARSE}, {"DELETE", fun_delete, 3, 3, FN_REG}, *************** *** 490,505 **** --- 490,508 ---- {"NAND", fun_nand, 1, INT_MAX, FN_REG}, {"NATTR", fun_nattr, 1, 1, FN_REG}, {"NATTRP", fun_nattr, 1, 1, FN_REG}, + {"NCHILDREN", fun_lsearch, 1, 1, FN_REG}, {"NCON", fun_dbwalker, 1, 1, FN_REG}, {"NEXITS", fun_dbwalker, 1, 1, FN_REG}, {"NPLAYERS", fun_dbwalker, 1, 1, FN_REG}, {"NEARBY", fun_nearby, 2, 2, FN_REG}, {"NEQ", fun_neq, 2, 2, FN_REG}, {"NEXT", fun_next, 1, 1, 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}, {"NOT", fun_not, 1, 1, FN_REG}, {"NSCEMIT", fun_cemit, 2, 3, FN_REG}, + {"NSEARCH", fun_lsearch, 1, INT_MAX, FN_REG}, {"NSEMIT", fun_emit, 1, -1, FN_REG}, {"NSLEMIT", fun_lemit, 1, -1, FN_REG}, {"NSOEMIT", fun_oemit, 2, -2, FN_REG}, *** 1_8_1.193/src/extmail.c Sun, 20 Nov 2005 15:35:31 -0600 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.33 660) --- 1_8_1.215(w)/src/extmail.c Mon, 30 Jan 2006 14:06:15 -0600 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.34 660) *************** *** 1469,1474 **** --- 1469,1475 ---- */ sender = player; player = Owner(player); + char *p; if (!arg1 || !*arg1) { if (arg2 && *arg2) { notify(player, T("MAIL: Invalid mail command.")); *************** *** 1500,1509 **** do_mail_send(sender, arg1, arg2, 0, 0, 0); } else { /* Must be reading or listing mail - no arg2 */ ! if (isdigit((unsigned char) *arg1) && !strchr(arg1, '-')) ! do_mail_read(player, arg1); ! else do_mail_list(player, arg1); } return; } --- 1501,1511 ---- do_mail_send(sender, arg1, arg2, 0, 0, 0); } else { /* Must be reading or listing mail - no arg2 */ ! if (((p = strchr(arg1, ':')) && (*(p + 1) == '\0')) ! || !(isdigit((unsigned char) *arg1) && !strchr(arg1, '-'))) do_mail_list(player, arg1); + else + do_mail_read(player, arg1); } return; } *************** *** 2677,2689 **** } } else { /* f:m */ ! if (!is_integer(p)) ! return 0; ! *msglow = parse_integer(p); ! if (*msglow == 0) ! *msglow = -1; ! if (msghigh) ! *msghigh = *msglow; } if (*msglow < 0 || (msghigh && *msghigh < 0) || *folder < 0 || *folder > MAX_FOLDERS) --- 2679,2698 ---- } } else { /* f:m */ ! if (!*p) { ! /* f: */ ! *msglow = 0; ! if (msghigh) ! *msghigh = HUGE_INT; ! } else { ! if (!is_integer(p)) ! return 0; ! *msglow = parse_integer(p); ! if (*msglow == 0) ! *msglow = -1; ! if (msghigh) ! *msghigh = *msglow; ! } } if (*msglow < 0 || (msghigh && *msghigh < 0) || *folder < 0 || *folder > MAX_FOLDERS) *** 1_8_1.193/src/command.c Sun, 27 Nov 2005 15:26:05 -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.4 660) --- 1_8_1.215(w)/src/command.c Mon, 30 Jan 2006 14:06:15 -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.5 660) *************** *** 159,165 **** 0}, {"@LISTMOTD", NULL, cmd_listmotd, CMD_T_ANY, 0, 0}, ! {"@LIST", "LOWERCASE MOTD FLAGS FUNCTIONS POWERS COMMANDS ATTRIBS", cmd_list, CMD_T_ANY, 0, 0}, {"@LOCK", NULL, cmd_lock, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_SWITCHES | CMD_T_NOGAGGED, 0, 0}, --- 159,166 ---- 0}, {"@LISTMOTD", NULL, cmd_listmotd, CMD_T_ANY, 0, 0}, ! {"@LIST", "LOWERCASE MOTD LOCKS FLAGS FUNCTIONS POWERS COMMANDS ATTRIBS", ! cmd_list, CMD_T_ANY, 0, 0}, {"@LOCK", NULL, cmd_lock, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_SWITCHES | CMD_T_NOGAGGED, 0, 0}, *** 1_8_1.193/src/cmds.c Mon, 31 Oct 2005 13:36:47 -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.6 660) --- 1_8_1.215(w)/src/cmds.c Mon, 30 Jan 2006 14:06:15 -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) *************** *** 465,470 **** --- 465,472 ---- do_list_commands(player, lc); else if (SW_ISSET(sw, SWITCH_ATTRIBS)) do_list_attribs(player, lc); + else if (SW_ISSET(sw, SWITCH_LOCKS)) + do_list_locks(player, arg_left, lc, T("Locks")); else if (SW_ISSET(sw, SWITCH_FLAGS)) do_list_flags("FLAG", player, arg_left, lc, T("Flags")); else if (SW_ISSET(sw, SWITCH_POWERS)) *************** *** 1087,1105 **** } COMMAND (cmd_page) { - char *t; int has_eq = 0; - if ((arg_right) && (*arg_right)) { - t = arg_right; - } else { - t = NULL; - } if (args_raw && *args_raw && strchr(args_raw, '=')) has_eq = 1; if (SW_ISSET(sw, SWITCH_PORT)) ! do_page_port(player, arg_left, t); else ! do_page(player, arg_left, t, cause, SW_ISSET(sw, SWITCH_NOEVAL), !(SW_ISSET(sw, SWITCH_BLIND) || (!(SW_ISSET(sw, SWITCH_LIST)) && (BLIND_PAGE))), SW_ISSET(sw, SWITCH_OVERRIDE), has_eq); --- 1089,1101 ---- } COMMAND (cmd_page) { int has_eq = 0; if (args_raw && *args_raw && strchr(args_raw, '=')) has_eq = 1; if (SW_ISSET(sw, SWITCH_PORT)) ! do_page_port(player, arg_left, arg_right); else ! do_page(player, arg_left, arg_right, cause, SW_ISSET(sw, SWITCH_NOEVAL), !(SW_ISSET(sw, SWITCH_BLIND) || (!(SW_ISSET(sw, SWITCH_LIST)) && (BLIND_PAGE))), SW_ISSET(sw, SWITCH_OVERRIDE), has_eq); *** 1_8_1.193/src/attrib.c Sat, 27 Aug 2005 13:36:28 -0500 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.2.1.1.1.3.1.1.1.1.1.1.3.43.1.15.1.1.1.2 660) --- 1_8_1.215(w)/src/attrib.c Mon, 30 Jan 2006 14:06:15 -0600 dunemush (pennmush/c/40_attrib.c 1.15.1.2.1.5.1.1.1.3.1.3.1.2.1.2.1.2.2.1.1.2.1.2.1.2.1.1.1.3.1.1.1.1.1.1.3.43.1.15.1.1.1.3 660) *************** *** 1538,1550 **** strcpy(tbuf1, atr_value(old)); if (s && (!*s || (strcasecmp(s, tbuf1) && !ok_player_alias(s, player, thing)))) { ! notify(player, T("That is not a valid alias.")); return -1; } } else { /* No old alias */ if (s && *s && !ok_player_alias(s, player, thing)) { ! notify(player, T("That is not a valid alias.")); return -1; } } --- 1538,1550 ---- strcpy(tbuf1, atr_value(old)); if (s && (!*s || (strcasecmp(s, tbuf1) && !ok_player_alias(s, player, thing)))) { ! notify_format(player, T("'%s' is not a valid alias."), s); return -1; } } else { /* No old alias */ if (s && *s && !ok_player_alias(s, player, thing)) { ! notify_format(player, T("'%s' is not a valid alias."), s); return -1; } } *** 1_8_1.193/src/atr_tab.c Mon, 27 Jun 2005 14:30:26 -0500 dunemush (pennmush/c/41_atr_tab.c 1.39.1.1.1.4 660) --- 1_8_1.215(w)/src/atr_tab.c Mon, 30 Jan 2006 14:06:15 -0600 dunemush (pennmush/c/41_atr_tab.c 1.39.1.1.1.5 660) *************** *** 181,187 **** return; } if (strcasecmp(perms, "none")) { ! flags = string_to_privs(attr_privs_set, perms, 0); if (!flags) { notify(player, T("I don't understand those permissions.")); return; --- 181,187 ---- return; } if (strcasecmp(perms, "none")) { ! flags = list_to_privs(attr_privs_set, perms, 0); if (!flags) { notify(player, T("I don't understand those permissions.")); return; *** 1_8_1.193/hdrs/version.h Tue, 06 Dec 2005 14:21:37 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.54 660) --- 1_8_1.215(w)/hdrs/version.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.55 660) *************** *** 1,4 **** #define VERSION "1.8.1" ! #define PATCHLEVEL "4" ! #define PATCHDATE "[12/06/2005]" ! #define NUMVERSION 1008001004 --- 1,4 ---- #define VERSION "1.8.1" ! #define PATCHLEVEL "5" ! #define PATCHDATE "[01/29/2006]" ! #define NUMVERSION 1008001005 *** 1_8_1.193/hdrs/parse.h Fri, 25 Feb 2005 13:26:09 -0600 dunemush (pennmush/c/51_parse.h 1.10.1.16 660) --- 1_8_1.215(w)/hdrs/parse.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/c/51_parse.h 1.10.1.17 660) *************** *** 181,187 **** #define PE_DEBUG 0x00000400 #define PE_DEFAULT (PE_COMPRESS_SPACES | PE_STRIP_BRACES | \ ! PE_EVALUATE | PE_FUNCTION_CHECK) /* PE_COMPRESS_SPACES strips leading and trailing spaces, and reduces sets * of internal spaces to one space. --- 181,190 ---- #define PE_DEBUG 0x00000400 #define PE_DEFAULT (PE_COMPRESS_SPACES | PE_STRIP_BRACES | \ ! PE_DOLLAR | PE_EVALUATE | PE_FUNCTION_CHECK) ! ! #define PE_UDEFAULT (PE_COMPRESS_SPACES | PE_STRIP_BRACES | \ ! PE_EVALUATE | PE_FUNCTION_CHECK) /* PE_COMPRESS_SPACES strips leading and trailing spaces, and reduces sets * of internal spaces to one space. *************** *** 207,212 **** --- 210,218 ---- * PE_DEFAULT is the most commonly used set of flags, normally sufficient * for calls to process_expression(). * + * PE_UDEFAULT is PE_DEFAULT without PE_DOLLAR, intended for use in + * calling attributes (via u(), mix, step, etc) + * * * tflags consists of one or more of the following termination flags: */ *** 1_8_1.193/hdrs/lock.h Fri, 25 Feb 2005 16:14:13 -0600 dunemush (pennmush/d/6_lock.h 1.27 660) --- 1_8_1.215(w)/hdrs/lock.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/d/6_lock.h 1.28 660) *************** *** 68,73 **** --- 68,75 ---- void init_locks(void); void clone_locks(dbref player, dbref orig, dbref clone); void do_lset(dbref player, char *what, char *flags); + void do_list_locks(dbref player, const char *arg, int lc, const char *label); + void list_locks(char *buff, char **bp, const char *name); const char *lock_flags(lock_list *ll); const char *lock_flags_long(lock_list *ll); void list_lock_flags(char *buff, char **bp); *** 1_8_1.193/hdrs/externs.h Wed, 02 Nov 2005 10:05:52 -0600 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.8.2.1.1.2.1.1.1.1.1.2.1.6.1.3.1.4.3.1.1.1.1.18.1.8.1.1.1.32.1.1.3.1.1.9 660) --- 1_8_1.215(w)/hdrs/externs.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/d/16_externs.h 1.1.1.53.1.2.1.8.2.1.1.2.1.1.1.1.1.2.1.6.1.3.1.4.3.1.1.1.1.18.1.8.1.1.1.32.1.1.3.1.1.10 660) *************** *** 207,212 **** --- 207,215 ---- char ccom[BUFFER_LEN]; /**< raw command */ int break_called; /**< Has the break command been called? */ char break_replace[BUFFER_LEN]; /**< What to replace the break with */ + int re_subpatterns; /**< The number of re subpatterns */ + int *re_offsets; /**< The offsets for the subpatterns */ + char *re_from; /**< The positions of the subpatterns */ }; typedef struct eval_context EVAL_CONTEXT; *************** *** 517,522 **** --- 520,536 ---- extern void parse_anon_attrib(dbref player, char *str, dbref *thing, ATTR **attrib); extern void free_anon_attrib(ATTR *attrib); + typedef struct _ufun_attrib { + dbref thing; + char contents[BUFFER_LEN]; + int pe_flags; + char *errmess; + } ufun_attrib; + extern int fetch_ufun_attrib(char *attrname, dbref executor, + ufun_attrib * ufun, int accept_lambda); + extern int call_ufun(ufun_attrib * ufun, char **wenv_args, int wenv_argc, + char *ret, dbref executor, dbref enactor, + PE_Info * pe_info); extern int member(dbref thing, dbref list); extern int recursive_member(dbref disallow, dbref from, int count); extern dbref remove_first(dbref first, dbref what); *** 1_8_1.193/hdrs/switches.h Wed, 08 Jun 2005 18:16:59 -0500 dunemush (pennmush/d/21_switches.h 1.2.1.6.2.7.1.14.1.2 660) --- 1_8_1.215(w)/hdrs/switches.h Mon, 30 Jan 2006 14:06:20 -0600 dunemush (pennmush/d/21_switches.h 1.2.1.6.2.7.1.14.1.3 660) *************** *** 64,150 **** #define SWITCH_JOIN 63 #define SWITCH_LETTER 64 #define SWITCH_LIST 65 ! #define SWITCH_LOWERCASE 66 ! #define SWITCH_LSARGS 67 ! #define SWITCH_ME 68 ! #define SWITCH_MEMBERS 69 ! #define SWITCH_MOD 70 ! #define SWITCH_MORTAL 71 ! #define SWITCH_MOTD 72 ! #define SWITCH_MUTE 73 ! #define SWITCH_NAME 74 ! #define SWITCH_NO 75 ! #define SWITCH_NOEVAL 76 ! #define SWITCH_NOFLAGCOPY 77 ! #define SWITCH_NOISY 78 ! #define SWITCH_NOSIG 79 ! #define SWITCH_NOSPACE 80 ! #define SWITCH_NOTIFY 81 ! #define SWITCH_NUKE 82 ! #define SWITCH_OFF 83 ! #define SWITCH_ON 84 ! #define SWITCH_OUTSIDE 85 ! #define SWITCH_OVERRIDE 86 ! #define SWITCH_PAGING 87 ! #define SWITCH_PANIC 88 ! #define SWITCH_PARANOID 89 ! #define SWITCH_PARENT 90 ! #define SWITCH_PLAYERS 91 ! #define SWITCH_PORT 92 ! #define SWITCH_POWERS 93 ! #define SWITCH_PREFIX 94 ! #define SWITCH_PRESERVE 95 ! #define SWITCH_PRINT 96 ! #define SWITCH_PRIVS 97 ! #define SWITCH_PURGE 98 ! #define SWITCH_QUICK 99 ! #define SWITCH_QUIET 100 ! #define SWITCH_READ 101 ! #define SWITCH_REBOOT 102 ! #define SWITCH_RECALL 103 ! #define SWITCH_REGEXP 104 ! #define SWITCH_REGIONS 105 ! #define SWITCH_REGISTER 106 ! #define SWITCH_REMOVE 107 ! #define SWITCH_RENAME 108 ! #define SWITCH_RESTORE 109 ! #define SWITCH_RESTRICT 110 ! #define SWITCH_RETROACTIVE 111 ! #define SWITCH_ROOM 112 ! #define SWITCH_ROOMS 113 ! #define SWITCH_RSARGS 114 ! #define SWITCH_SEE 115 ! #define SWITCH_SEEFLAG 116 ! #define SWITCH_SELF 117 ! #define SWITCH_SEND 118 ! #define SWITCH_SET 119 ! #define SWITCH_SILENT 120 ! #define SWITCH_SKIPDEFAULTS 121 ! #define SWITCH_SPEAK 122 ! #define SWITCH_SPOOF 123 ! #define SWITCH_STATS 124 ! #define SWITCH_SUMMARY 125 ! #define SWITCH_TABLES 126 ! #define SWITCH_TAG 127 ! #define SWITCH_TELEPORT 128 ! #define SWITCH_TF 129 ! #define SWITCH_THINGS 130 ! #define SWITCH_TITLE 131 ! #define SWITCH_TRACE 132 ! #define SWITCH_TYPE 133 ! #define SWITCH_UNCLEAR 134 ! #define SWITCH_UNFOLDER 135 ! #define SWITCH_UNGAG 136 ! #define SWITCH_UNHIDE 137 ! #define SWITCH_UNMUTE 138 ! #define SWITCH_UNTAG 139 ! #define SWITCH_UNTIL 140 ! #define SWITCH_URGENT 141 ! #define SWITCH_USEFLAG 142 ! #define SWITCH_WHAT 143 ! #define SWITCH_WHO 144 ! #define SWITCH_WIPE 145 ! #define SWITCH_WIZ 146 ! #define SWITCH_WIZARD 147 ! #define SWITCH_YES 148 ! #define SWITCH_ZONE 149 --- 64,151 ---- #define SWITCH_JOIN 63 #define SWITCH_LETTER 64 #define SWITCH_LIST 65 ! #define SWITCH_LOCKS 66 ! #define SWITCH_LOWERCASE 67 ! #define SWITCH_LSARGS 68 ! #define SWITCH_ME 69 ! #define SWITCH_MEMBERS 70 ! #define SWITCH_MOD 71 ! #define SWITCH_MORTAL 72 ! #define SWITCH_MOTD 73 ! #define SWITCH_MUTE 74 ! #define SWITCH_NAME 75 ! #define SWITCH_NO 76 ! #define SWITCH_NOEVAL 77 ! #define SWITCH_NOFLAGCOPY 78 ! #define SWITCH_NOISY 79 ! #define SWITCH_NOSIG 80 ! #define SWITCH_NOSPACE 81 ! #define SWITCH_NOTIFY 82 ! #define SWITCH_NUKE 83 ! #define SWITCH_OFF 84 ! #define SWITCH_ON 85 ! #define SWITCH_OUTSIDE 86 ! #define SWITCH_OVERRIDE 87 ! #define SWITCH_PAGING 88 ! #define SWITCH_PANIC 89 ! #define SWITCH_PARANOID 90 ! #define SWITCH_PARENT 91 ! #define SWITCH_PLAYERS 92 ! #define SWITCH_PORT 93 ! #define SWITCH_POWERS 94 ! #define SWITCH_PREFIX 95 ! #define SWITCH_PRESERVE 96 ! #define SWITCH_PRINT 97 ! #define SWITCH_PRIVS 98 ! #define SWITCH_PURGE 99 ! #define SWITCH_QUICK 100 ! #define SWITCH_QUIET 101 ! #define SWITCH_READ 102 ! #define SWITCH_REBOOT 103 ! #define SWITCH_RECALL 104 ! #define SWITCH_REGEXP 105 ! #define SWITCH_REGIONS 106 ! #define SWITCH_REGISTER 107 ! #define SWITCH_REMOVE 108 ! #define SWITCH_RENAME 109 ! #define SWITCH_RESTORE 110 ! #define SWITCH_RESTRICT 111 ! #define SWITCH_RETROACTIVE 112 ! #define SWITCH_ROOM 113 ! #define SWITCH_ROOMS 114 ! #define SWITCH_RSARGS 115 ! #define SWITCH_SEE 116 ! #define SWITCH_SEEFLAG 117 ! #define SWITCH_SELF 118 ! #define SWITCH_SEND 119 ! #define SWITCH_SET 120 ! #define SWITCH_SILENT 121 ! #define SWITCH_SKIPDEFAULTS 122 ! #define SWITCH_SPEAK 123 ! #define SWITCH_SPOOF 124 ! #define SWITCH_STATS 125 ! #define SWITCH_SUMMARY 126 ! #define SWITCH_TABLES 127 ! #define SWITCH_TAG 128 ! #define SWITCH_TELEPORT 129 ! #define SWITCH_TF 130 ! #define SWITCH_THINGS 131 ! #define SWITCH_TITLE 132 ! #define SWITCH_TRACE 133 ! #define SWITCH_TYPE 134 ! #define SWITCH_UNCLEAR 135 ! #define SWITCH_UNFOLDER 136 ! #define SWITCH_UNGAG 137 ! #define SWITCH_UNHIDE 138 ! #define SWITCH_UNMUTE 139 ! #define SWITCH_UNTAG 140 ! #define SWITCH_UNTIL 141 ! #define SWITCH_URGENT 142 ! #define SWITCH_USEFLAG 143 ! #define SWITCH_WHAT 144 ! #define SWITCH_WHO 145 ! #define SWITCH_WIPE 146 ! #define SWITCH_WIZ 147 ! #define SWITCH_WIZARD 148 ! #define SWITCH_YES 149 ! #define SWITCH_ZONE 150 *** 1_8_1.193/hdrs/privtab.h Sun, 16 Jan 2005 15:23:51 -0600 dunemush (pennmush/d/22_privtab.h 1.8 660) --- 1_8_1.215(w)/hdrs/privtab.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/d/22_privtab.h 1.9 660) *************** *** 28,33 **** --- 28,34 ---- #define PrivShowBits(x) ((x)->bits_to_show) extern int string_to_privs(PRIV *table, const char *str, long int origprivs); + extern int list_to_privs(PRIV *table, const char *str, long int origprivs); extern int string_to_privsets(PRIV *table, const char *str, int *setprivs, int *clrprivs); extern int letter_to_privs(PRIV *table, const char *str, long int origprivs); *** 1_8_1.193/hdrs/access.h Sat, 01 Feb 2003 17:23:16 -0600 dunemush (pennmush/d/28_access.h 1.5.1.5 660) --- 1_8_1.215(w)/hdrs/access.h Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/d/28_access.h 1.5.1.6 660) *************** *** 37,43 **** #define Site_Can_Connect(hname, who) site_can_access(hname,ACS_CONNECT, who) #define Site_Can_Create(hname) site_can_access(hname,ACS_CREATE, AMBIGUOUS) ! #define Site_Can_Guest(hname) site_can_access(hname,ACS_GUEST, AMBIGUOUS) #define Site_Can_Register(hname) site_can_access(hname,ACS_REGISTER, AMBIGUOUS) #define Deny_Silent_Site(hname, who) site_can_access(hname,ACS_DENY_SILENT, who) #define Suspect_Site(hname, who) site_can_access(hname,ACS_SUSPECT, who) --- 37,43 ---- #define Site_Can_Connect(hname, who) site_can_access(hname,ACS_CONNECT, who) #define Site_Can_Create(hname) site_can_access(hname,ACS_CREATE, AMBIGUOUS) ! #define Site_Can_Guest(hname,who) site_can_access(hname,ACS_GUEST, who) #define Site_Can_Register(hname) site_can_access(hname,ACS_REGISTER, AMBIGUOUS) #define Deny_Silent_Site(hname, who) site_can_access(hname,ACS_DENY_SILENT, who) #define Suspect_Site(hname, who) site_can_access(hname,ACS_SUSPECT, who) *** 1_8_1.193/Configure Thu, 15 Sep 2005 18:16:50 -0500 dunemush (pennmush/d/32_Configure 1.21.1.4.1.1.1.1.1.1.1.7.1.15.1.1.1.3 710) --- 1_8_1.215(w)/Configure Fri, 13 Jan 2006 22:07:07 -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) *************** *** 3148,3157 **** if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then val="$define" ! echo "You are using the GNU C Library" else val="$undef" ! echo "You are not using the GNU C Library" fi $rm -f gnulibc* set d_gnulibc --- 3148,3174 ---- if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then val="$define" ! echo "You are using the GNU C Library" >&4 ! else ! cat >gnulibc.c < ! int main() ! { ! #ifdef __GLIBC__ ! return 0; ! #else ! return 1; ! #endif ! } ! EOM ! if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ ! ./gnulibc; then ! val="$define" ! echo "You are using the GNU C Library" >&4 else val="$undef" ! echo "You are not using the GNU C Library" >&4 ! fi fi $rm -f gnulibc* set d_gnulibc *** 1_8_1.193/options.h.dist Thu, 06 May 2004 00:31:00 -0500 dunemush (pennmush/d/33_options.h. 1.10.1.1.1.1.1.2.1.1.1.1.1.1.1.3.1.6.1.2.2.3.1.1.1.13 600) --- 1_8_1.215(w)/options.h.dist Fri, 13 Jan 2006 22:39:22 -0600 dunemush (pennmush/d/33_options.h. 1.10.1.1.1.1.1.2.1.1.1.1.1.1.1.3.1.6.1.2.2.3.1.1.1.13.2.1 600) *************** *** 114,120 **** * argument ("get the recipient address from the message header To:"). * If it doesn't, you could probably write a wrapper for it. * Example: #define MAILER "/full/path/to/other/mailer" ! /* #define MAILER /* */ ! #endif --- 114,120 ---- * argument ("get the recipient address from the message header To:"). * If it doesn't, you could probably write a wrapper for it. * Example: #define MAILER "/full/path/to/other/mailer" ! */ ! /* #define MAILER "" /* */ #endif *** 1_8_1.193/win32/msvc6/pennmush.dsp Thu, 31 Mar 2005 11:02:09 -0600 dunemush (pennmush/f/9_pennmush.d 1.23 600) --- 1_8_1.215(w)/win32/msvc6/pennmush.dsp Tue, 13 Dec 2005 13:42:58 -0600 dunemush (pennmush/f/9_pennmush.d 1.24 660) *************** *** 65,84 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL SSL Release" --- 65,102 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL SSL Release" *************** *** 112,131 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL Debug" --- 130,167 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL Debug" *************** *** 159,178 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL Release" --- 195,232 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 MySQL Release" *************** *** 204,223 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Debug" --- 258,295 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Debug" *************** *** 251,270 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Release" --- 323,360 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 SSL Release" *************** *** 297,316 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 Debug" --- 387,424 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 Debug" *************** *** 342,361 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 Release" --- 450,487 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ELSEIF "$(CFG)" == "pennmush - Win32 Release" *************** *** 386,405 **** InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! "$(ProjDir)\win32-build" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf ! IF NOT EXIST $(ProjDir)\game\alias.cnf copy $(ProjDir)\game\aliascnf.dst $(ProjDir)\game\alias.cnf ! IF NOT EXIST $(ProjDir)\game\names.cnf copy $(ProjDir)\game\namescnf.dst $(ProjDir)\game\names.cnf ! IF NOT EXIST $(ProjDir)\game\restrict.cnf copy $(ProjDir)\game\restrictcnf.dst $(ProjDir)\game\restrict.cnf ! IF NOT EXIST $(ProjDir)\hdrs\cmds.h copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h ! IF NOT EXIST $(ProjDir)\\hdrs\funs.h copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h ! echo If any *local.c files failed to build, run build again. # End Custom Build !ENDIF --- 512,549 ---- InputPath=.\game\pennmush.exe SOURCE="$(InputPath)" ! BuildCmds= \ ! IF NOT EXIST $(ProjDir)\src\cmdlocal.c copy $(ProjDir)\src\cmdlocal.dst $(ProjDir)\src\cmdlocal.c \ ! IF NOT EXIST $(ProjDir)\src\flaglocal.c copy $(ProjDir)\src\flaglocal.dst $(ProjDir)\src\flaglocal.c \ ! IF NOT EXIST $(ProjDir)\src\funlocal.c copy $(ProjDir)\src\funlocal.dst $(ProjDir)\src\funlocal.c \ ! IF NOT EXIST $(ProjDir)\src\local.c copy $(ProjDir)\src\local.dst $(ProjDir)\src\local.c \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf echo Don't forget to customize mush.cnf! \ ! IF NOT EXIST $(ProjDir)\game\mush.cnf copy $(ProjDir)\game\mushcnf.dst $(ProjDir)\game\mush.cnf \ ! copy $(ProjDir)\win32\cmds.h $(ProjDir)\hdrs\cmds.h \ ! copy $(ProjDir)\win32\funs.h $(ProjDir)\hdrs\funs.h \ ! echo If any *local.c files failed to build, run build again. \ + + "$(ProjDir)\src\cmdlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\flaglocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\funlocal.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\src\local.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\game\mush.cnf" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\cmds.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + + "$(ProjDir)\hdrs\funs.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) # End Custom Build !ENDIF *************** *** 596,601 **** --- 740,749 ---- # End Source File # Begin Source File + SOURCE=.\src\myrlimit.c + # End Source File + # Begin Source File + SOURCE=.\src\mysocket.c # End Source File # Begin Source File *** 1_8_1.193/game/txt/hlp/pennvOLD.hlp Mon, 03 Oct 2005 11:20:53 -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.3 660) --- 1_8_1.215(w)/game/txt/hlp/pennvOLD.hlp Mon, 30 Jan 2006 14:06:17 -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.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 ! 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 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 ! 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 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.193/src/sql.c Sat, 20 Aug 2005 19:48:00 -0500 dunemush (pennmush/h/16_sql.c 1.9 660) --- 1_8_1.215(w)/src/sql.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/h/16_sql.c 1.11 660) *************** *** 35,42 **** static MYSQL *mysql_struct = NULL; #define MYSQL_RETRY_TIMES 3 ! static int safe_sql_query(dbref player, char *q_string, char row_delim, ! char field_delim, char *buff, char **bp); static int sql_init(void); void --- 35,42 ---- static MYSQL *mysql_struct = NULL; #define MYSQL_RETRY_TIMES 3 ! static int safe_sql_query(dbref player, char *q_string, char *rowsep, ! char *fieldsep, char *buff, char **bp); static int sql_init(void); void *************** *** 83,92 **** return 0; } - #define print_sep(s,b,p) if (s) safe_chr(s,b,p) - static int ! safe_sql_query(dbref player, char *q_string, char row_delim, char field_delim, char *buff, char **bp) { MYSQL_RES *qres; --- 83,90 ---- return 0; } static int ! safe_sql_query(dbref player, char *q_string, char *rowsep, char *fieldsep, char *buff, char **bp) { MYSQL_RES *qres; *************** *** 152,162 **** i = 0; while ((row_p = mysql_fetch_row(qres)) != NULL) { if (i++ > 0) { ! print_sep(row_delim, buff, bp); } for (j = 0; j < got_fields; j++) { if (j > 0) { ! print_sep(field_delim, buff, bp); } if (row_p[j] && *row_p[j]) if (safe_str(row_p[j], buff, bp)) --- 150,160 ---- i = 0; while ((row_p = mysql_fetch_row(qres)) != NULL) { if (i++ > 0) { ! safe_str(rowsep, buff, bp); } for (j = 0; j < got_fields; j++) { if (j > 0) { ! safe_str(fieldsep, buff, bp); } if (row_p[j] && *row_p[j]) if (safe_str(row_p[j], buff, bp)) *************** *** 192,198 **** FUNCTION(fun_sql) { ! char row_delim, field_delim; if (!Sql_Ok(executor)) { safe_str(T(e_perm), buff, bp); --- 190,197 ---- FUNCTION(fun_sql) { ! char *rowsep = (char *) " "; ! char *fieldsep = (char *) " "; if (!Sql_Ok(executor)) { safe_str(T(e_perm), buff, bp); *************** *** 200,234 **** } if (nargs >= 2) { ! /* we have a delimiter in args[2]. Got to parse it */ ! char insep[BUFFER_LEN]; ! char *isep = insep; ! const char *arg2 = args[1]; ! process_expression(insep, &isep, &arg2, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); ! *isep = '\0'; ! strcpy(args[1], insep); } if (nargs >= 3) { ! /* we have a delimiter in args[3]. Got to parse it */ ! char insep[BUFFER_LEN]; ! char *isep = insep; ! const char *arg3 = args[2]; ! process_expression(insep, &isep, &arg3, executor, caller, enactor, ! PE_DEFAULT, PT_DEFAULT, pe_info); ! *isep = '\0'; ! strcpy(args[2], insep); } ! if (!delim_check(buff, bp, nargs, args, 2, &row_delim)) ! return; ! if (nargs < 3) ! field_delim = ' '; ! else if (!delim_check(buff, bp, nargs, args, 3, &field_delim)) ! return; ! ! safe_sql_query(executor, args[0], row_delim, field_delim, buff, bp); } --- 199,214 ---- } if (nargs >= 2) { ! /* we have a row separator in args[1]. */ ! rowsep = args[1]; } if (nargs >= 3) { ! /* we have a field separator in args[2]. Got to parse it */ ! fieldsep = args[2]; } ! safe_sql_query(executor, args[0], rowsep, fieldsep, buff, bp); } *************** *** 261,267 **** COMMAND (cmd_sql) { ! safe_sql_query(player, arg_left, ' ', ' ', NULL, NULL); } #else --- 241,247 ---- COMMAND (cmd_sql) { ! safe_sql_query(player, arg_left, NULL, NULL, NULL, NULL); } #else *** 1_8_1.193/CHANGES.180 Mon, 12 Dec 2005 12:24:47 -0600 dunemush (pennmush/h/21_CHANGES.18 1.53 600) --- 1_8_1.215(w)/CHANGES.180 Sun, 29 Jan 2006 11:45:48 -0600 dunemush (pennmush/h/21_CHANGES.18 1.56 600) *************** *** 12,17 **** --- 12,29 ---- ========================================================================== + Version 1.8.0 patchlevel 10 January 29, 2006 + + Minor changes: + * Row and field separators in sql() may now by more than one + character. Patch by Walker@M*U*S*H. + Fixes: + * Fix to GNU libc detection in Configure by Petr Salinger. + * Definition of MAILER in options.h.dist made to work by Luke@M*U*S*H. + * Fix to double-parsing of row and field separators in sql() + by Walker@M*U*S*H. + + Version 1.8.0 patchlevel 9 December 12, 2005 Fixes: *** 1_8_1.193/game/txt/hlp/pennv180.hlp Mon, 12 Dec 2005 12:26:35 -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.2 660) --- 1_8_1.215(w)/game/txt/hlp/pennv180.hlp Mon, 30 Jan 2006 14:06:17 -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.2 660) *************** *** 1,3 **** --- 1,16 ---- + & 1.8.0p10 + Version 1.8.0 patchlevel 10 January 29, 2006 + + Minor changes: + * Row and field separators in sql() may now by more than one + character. Patch by Walker@M*U*S*H. + Fixes: + * Fix to GNU libc detection in Configure by Petr Salinger. + * Definition of MAILER in options.h.dist made to work by Luke@M*U*S*H. + * Fix to double-parsing of row and field separators in sql() + by Walker@M*U*S*H. + + & 1.8.0p9 Version 1.8.0 patchlevel 9 December 12, 2005 *** 1_8_1.193/game/txt/hlp/pennv181.hlp Mon, 12 Dec 2005 12:26:35 -0600 dunemush (pennmush/h/29_pennv181.h 1.70 660) --- 1_8_1.215(w)/game/txt/hlp/pennv181.hlp Mon, 30 Jan 2006 14:06:17 -0600 dunemush (pennmush/h/29_pennv181.h 1.84 660) *************** *** 1,4 **** ! & 1.8.1p4 & 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.1p5 & 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,58 ---- A list of the patchlevels associated with each release can be read in 'help patchlevels'. + Version 1.8.1 patchlevel 5 January 29, 2006 + + Major Changes: + * @attrib/access no longer treats one-word flag lists that don't + match a single flag as a set of flag characters. You must now always + specify a space-separated list of full flag names. + Commands: + * @list/locks and list(locks) lists all defined locktypes. + Suggested by Jules@M*U*S*H, patch by Walker@M*U*S*H. + * New @search classes 'start' (nth element of return list to start + with) and 'count' (how many elements to show, from ). + Useful for getting results a page at a time. Patch by Walker@M*U*S*H. + Functions: + * nsearch()/nlsearch()/nchildren() return the number of objects that + would be returned by the equivalent search/lsearch/children call. + Patch by Walker@M*U*S*H. + Minor Changes: + * delete() can use a negative length argument to delete characters + leftward, a la MUX. [MUX, SW]. + * In @mail commands, : is now recognized as meaning 'all messages + in folder n'. Notably, @mail 3: now lists all messages in folder 3, + rather than reading all messages in folder 3. Patch by Sketch@M*U*S*H. + * When one alias in a list of aliases being set is invalid, we + now report it with specificity. Suggested by Talvo@M*U*S*H. + * You no longer need to escape commas in decompose(). Suggested by + Trinsec@M*U*S*H. + * @sitelock rules for Guest access can now be specified per-guest + character. Suggested by Talvo@M*U*S*H. + * process_expression now parses for regex pattern captures by default, + so lots of things will work better under regedit(). Use of a ufun + clears the captured registers so dollar signs in ufuns don't + need escaping. Patch by Walker@M*U*S*H. + * Refactoring of ufun code by Walker@M*U*S*H. + Fixes: + * Help fixes by Trinsec@M*U*S*H and Talvo@M*U*S*H and qa'toq@M*U*S*H. + * Crash bug in page fixed. Reported by the fine folks at ST:Foundation. + Patch by Walker@M*U*S*H. + * Win32 portability fixes. [EEH] + * Fixes from 1.8.0p10. + + + & 1.8.1p4 Version 1.8.1 patchlevel 4 December 6, 2005 Major Changes: *** 1_8_1.193/CHANGES.181 Mon, 12 Dec 2005 12:26:35 -0600 dunemush (pennmush/h/30_CHANGES.18 1.65 600) --- 1_8_1.215(w)/CHANGES.181 Sun, 29 Jan 2006 11:43:44 -0600 dunemush (pennmush/h/30_CHANGES.18 1.79 600) *************** *** 13,18 **** --- 13,59 ---- ========================================================================== + Version 1.8.1 patchlevel 5 January 29, 2006 + + Major Changes: + * @attrib/access no longer treats one-word flag lists that don't + match a single flag as a set of flag characters. You must now always + specify a space-separated list of full flag names. + Commands: + * @list/locks and list(locks) lists all defined locktypes. + Suggested by Jules@M*U*S*H, patch by Walker@M*U*S*H. + * New @search classes 'start' (nth element of return list to start + with) and 'count' (how many elements to show, from ). + Useful for getting results a page at a time. Patch by Walker@M*U*S*H. + Functions: + * nsearch()/nlsearch()/nchildren() return the number of objects that + would be returned by the equivalent search/lsearch/children call. + Patch by Walker@M*U*S*H. + Minor Changes: + * delete() can use a negative length argument to delete characters + leftward, a la MUX. [MUX, SW]. + * In @mail commands, : is now recognized as meaning 'all messages + in folder n'. Notably, @mail 3: now lists all messages in folder 3, + rather than reading all messages in folder 3. Patch by Sketch@M*U*S*H. + * When one alias in a list of aliases being set is invalid, we + now report it with specificity. Suggested by Talvo@M*U*S*H. + * You no longer need to escape commas in decompose(). Suggested by + Trinsec@M*U*S*H. + * @sitelock rules for Guest access can now be specified per-guest + character. Suggested by Talvo@M*U*S*H. + * process_expression now parses for regex pattern captures by default, + so lots of things will work better under regedit(). Use of a ufun + clears the captured registers so dollar signs in ufuns don't + need escaping. Patch by Walker@M*U*S*H. + * Refactoring of ufun code by Walker@M*U*S*H. + Fixes: + * Help fixes by Trinsec@M*U*S*H and Talvo@M*U*S*H and qa'toq@M*U*S*H. + * Crash bug in page fixed. Reported by the fine folks at ST:Foundation. + Patch by Walker@M*U*S*H. + * Win32 portability fixes. [EEH] + * Fixes from 1.8.0p10. + + Version 1.8.1 patchlevel 4 December 6, 2005 Major Changes: *** 1_8_1.193/src/myrlimit.c Sat, 29 Oct 2005 20:06:01 -0500 dunemush (pennmush/h/41_myrlimit.c 1.2 660) --- 1_8_1.215(w)/src/myrlimit.c Mon, 30 Jan 2006 14:06:16 -0600 dunemush (pennmush/h/41_myrlimit.c 1.3 660) *************** *** 16,21 **** --- 16,28 ---- #ifdef I_SYS_TYPES #include #endif + #ifdef WIN32 + #define FD_SETSIZE 256 + #include + #include + #include + #define EWOULDBLOCK WSAEWOULDBLOCK + #endif #ifdef I_UNISTD #include #endif *************** *** 27,32 **** --- 34,40 ---- #include "conf.h" #include "version.h" + #include "externs.h" #include "confmagic.h" #ifdef HAS_GETRLIMIT *************** *** 34,39 **** --- 42,51 ---- #endif int how_many_fds(void); + #ifdef WIN32 + static WSADATA wsadata; + #endif + #ifdef HAS_GETRLIMIT void init_rlimit(void) *************** *** 77,82 **** --- 89,96 ---- static int open_max = 0; #ifdef WIN32 int iMaxSocketsAllowed; + unsigned short wVersionRequested = MAKEWORD(1, 1); + int err; #endif if (open_max) return open_max; *************** *** 93,98 **** --- 107,119 ---- * wsadata.iMaxSockets isn't valid for WinSock versions 2.0 * and later, but we are requesting version 1.1, so it's valid. */ + + /* Need to init Windows Sockets to get socket data */ + err = WSAStartup(wVersionRequested, &wsadata); + if (err) { + printf(T("Error %i on WSAStartup\n"), err); + exit(1); + } iMaxSocketsAllowed = options.max_logins ? (2 * options.max_logins) : 120; if (wsadata.iMaxSockets < iMaxSocketsAllowed) iMaxSocketsAllowed = wsadata.iMaxSockets;