This is patch30 to PennMUSH 1.7.7. After applying this patch, you will have version 1.7.7p30 To apply this patch, save it to a file in your top-level MUSH directory, and do the following: patch -p1 < 1.7.7-patch30 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: * CHAT_SYSTEM option removed. If you don't want to use the chat system, use restrict.cnf to disable @channel, @chat, etc. * USE_MAILER and MAIL_ALIAS options removed. If you don't want to use the @mail or @malias systems, use restrict.cnf to disable the associated commands. * QUOTA, EMPTY_ATTRS, and FUNCTION_SIDE_EFFECTS options are now runtime options, instead of compile-time. * SINGLE_LOGFILE option removed, and log filenames are now runtime options. You may now give the same name to multiple log files and get a more fine-grained version of the same effect. Based on ideas by Vadiv@M*U*S*H. Minor changes: * New IP^ and HOSTNAME^ tests for boolexps. Suggested by Luke@M*U*S*H. * ALLOW_NOSUBJECT option removed. We always use the beginning of the message as the subject if one is not provided. * JURY_OK and UNINSPECTED_FLAG options removed. Use @flag to add flags if you need them. ONLINE_REG and VACATION_FLAG options removed (default to always defined, add or remove with @flag as desired). * MEM_CHECK option removed from options.h; it is now a runtime option in mush.cnf. * @function/restrict can be applied to softcoded @functions, and @function/add can accept a list of restrictions as a fifth argument. Patch by Luke@M*U*S*H. * log_walls run-time configuration option removed. Use the logargs option in restrict.cnf instead. Fixes: * Crash bug in anonymous attributes fixed. Report by Intrevis@M*U*S*H. * lplayers() was broken. Report by T'orA@M*U*S*H. * Failing to create a player by providing a bad password now gives a better error. Suggested by [NJG]. * Setting/clearing a chan title on a notitles channel works, but reminds you that titles are off. Suggested by Dan@InNomine. * haspower_restricted removed from mushcnf.dst to stop spurious warning on startup. Report by Nymeria@M*U*S*H. Prereq: 1.7.7p29 *** 1_7_7.920/Patchlevel Wed, 28 Apr 2004 09:46:59 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.31 600) --- 1_7_7.964(w)/Patchlevel Thu, 06 May 2004 10:37:42 -0500 dunemush (pennmush/5_Patchlevel 1.17.1.11.1.31 600) *************** *** 1,2 **** Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p29 --- 1,2 ---- Do not edit this file. It is maintained by the official PennMUSH patches. ! This is PennMUSH 1.7.7p30 *** 1_7_7.920/CHANGES.177 Wed, 28 Apr 2004 09:46:59 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.53 600) --- 1_7_7.964(w)/CHANGES.177 Thu, 06 May 2004 10:38:02 -0500 dunemush (pennmush/g/23_CHANGES 1.48.1.258.1.14.1.71 600) *************** *** 18,23 **** --- 18,63 ---- ========================================================================== + Version 1.7.7 patchlevel 30 May 6, 2004 + + Major changes: + * CHAT_SYSTEM option removed. If you don't want to use the chat system, + use restrict.cnf to disable @channel, @chat, etc. + * USE_MAILER and MAIL_ALIAS options removed. If you don't want to + use the @mail or @malias systems, use restrict.cnf to disable + the associated commands. + * QUOTA, EMPTY_ATTRS, and FUNCTION_SIDE_EFFECTS options are now + runtime options, instead of compile-time. + * SINGLE_LOGFILE option removed, and log filenames are now + runtime options. You may now give the same name to + multiple log files and get a more fine-grained version of the + same effect. Based on ideas by Vadiv@M*U*S*H. + Minor changes: + * New IP^ and HOSTNAME^ tests for boolexps. Suggested by Luke@M*U*S*H. + * ALLOW_NOSUBJECT option removed. We always use the beginning of the + message as the subject if one is not provided. + * JURY_OK and UNINSPECTED_FLAG options removed. Use @flag to add + flags if you need them. ONLINE_REG and VACATION_FLAG options + removed (default to always defined, add or remove with @flag as + desired). + * MEM_CHECK option removed from options.h; it is now a runtime + option in mush.cnf. + * @function/restrict can be applied to softcoded @functions, and + @function/add can accept a list of restrictions as a fifth argument. + Patch by Luke@M*U*S*H. + * log_walls run-time configuration option removed. Use the + logargs option in restrict.cnf instead. + Fixes: + * Crash bug in anonymous attributes fixed. Report by Intrevis@M*U*S*H. + * lplayers() was broken. Report by T'orA@M*U*S*H. + * Failing to create a player by providing a bad password now gives + a better error. Suggested by [NJG]. + * Setting/clearing a chan title on a notitles channel works, but + reminds you that titles are off. Suggested by Dan@InNomine. + * haspower_restricted removed from mushcnf.dst to stop spurious + warning on startup. Report by Nymeria@M*U*S*H. + + Version 1.7.7 patchlevel 29 April 28, 2004 Major changes: *** 1_7_7.920/game/txt/hlp/penntop.hlp Mon, 05 Apr 2004 00:19:02 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.4 600) --- 1_7_7.964(w)/game/txt/hlp/penntop.hlp Sat, 01 May 2004 14:11:54 -0500 dunemush (pennmush/13_penntop.hl 1.2.1.27.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.1.1.1.1.8.1.5 600) *************** *** 1923,1928 **** --- 1923,1930 ---- noguest Usable only by non-guest @powered objects. nobody Nothing can use it. Same as the /disable switch to @command or @function. + noparse Function arguments are not evaluated. Only applies + to @functions. Commands can also use the 'noplayer' restriction, which stops player objects from using the command, as well as any generic *** 1_7_7.920/game/txt/hlp/penncmd.hlp Mon, 29 Mar 2004 00:03:16 -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.22 600) --- 1_7_7.964(w)/game/txt/hlp/penncmd.hlp Sun, 02 May 2004 17:39:56 -0500 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.24 600) *************** *** 1408,1414 **** & @function @function [] ! @function =,[,, ] or @function =/ @function/ --- 1408,1414 ---- & @function @function [] ! @function =,[,, [,]] or @function =/ @function/ *************** *** 1479,1489 **** For example: @function/delete ansi &ansi_fun #1234=%0 ! @function ansi=#1234, ansi_fun, 2, 2 will create a new version of ansi() that doesn't do any colorization, and that requires it to be called with exactly ! 2 arguments, like the built-in version. See also: RESTRICT, FUNCTIONS, @startup & @grep --- 1479,1490 ---- For example: @function/delete ansi &ansi_fun #1234=%0 ! @function ansi=#1234, ansi_fun, 2, 2, noguest will create a new version of ansi() that doesn't do any colorization, and that requires it to be called with exactly ! 2 arguments, like the built-in version. It will be restricted to ! non-guest players. See also: RESTRICT, FUNCTIONS, @startup & @grep *************** *** 1982,1988 **** (continued in help @lock9) & @lock9 You can also test for set flags, powers, or object types in a lock directly, ! without using an evaluation lock, with these formats: @lock =flag^ @lock =type^ --- 1983,1989 ---- (continued in help @lock9) & @lock9 You can also test for set flags, powers, or object types in a lock directly, ! without using an evaluation lock, with these formats: @lock =flag^ @lock =type^ *************** *** 1997,2002 **** --- 1998,2012 ---- For example, @lock/use Admin Commands=flag^wizard|flag^royalty + + You can test for the current IP address or hostname of the owner + of the object (who must be connected to pass this test) with: + @lock =ip^ + @lock =hostname^ + + You may use wildcards (*, ?) in these patterns. Note that hostname + tests are insecure; players who control their reverse DNS can spoof + any hostname. See also: locktypes, @clock & locktypes *** 1_7_7.920/game/restart Mon, 15 Sep 2003 11:37:00 -0500 dunemush (pennmush/39_restart 1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.2.2.1.2.2.1.1.1.1 700) --- 1_7_7.964(w)/game/restart Sun, 02 May 2004 11:38:31 -0500 dunemush (pennmush/39_restart 1.1.1.1.1.1.1.2.1.1.1.1.1.2.1.2.2.1.2.2.1.1.1.1.1.1 700) *************** *** 15,20 **** --- 15,24 ---- # The error log file LOG=log/netmush.log + # Uncomment the line below to attempt to allow crashes to produce + # core dumps. If you're getting crashes, this is the best way + # to debug them. + #ulimit -c unlimited if [ ! -d $GAMEDIR ]; then echo "GAMEDIR doesn't appear to be a directory. It's: $GAMEDIR" *** 1_7_7.920/game/mushcnf.dst Mon, 12 Apr 2004 20:44:19 -0500 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.23 600) --- 1_7_7.964(w)/game/mushcnf.dst Thu, 06 May 2004 00:30:22 -0500 dunemush (pennmush/41_mushcnf.ds 1.1.1.19.1.1.1.2.1.1.1.8.1.1.1.1.1.29 600) *************** *** 375,380 **** --- 375,383 ---- # actual maximum length you want. player_name_len 16 + # Limit the number of objects players can own. + use_quota yes + ### ### Dump stuff ### *************** *** 464,469 **** --- 467,493 ---- ### ### Logging ### + ### When selecting log files, you may assign multiple logs to the + ### same filename. If you don't assign a filename to a log, + ### messages are written on stderr instead (usually redirected to + ### log/netmush.log). Probably unwise to change these in a running + ### MUSH. + ### + + # Filename to log connections to + connect_log log/connect.log + + # Filename to log wizard commands to + wizard_log log/wizard.log + + # Filename to log dump checkpoint messages to + checkpt_log log/checkpt.log + + # Filename to log debugging trace messages to + trace_log log/trace.log + + # Filename to log commands by SUSPECT players to + command_log log/command.log # log all commands. Makes big, big command.log files. Use only for # debugging, generally. *************** *** 475,482 **** # log forces done by wizards log_forces yes ! # log wizwalls ! log_walls no ### ### Logins --- 499,509 ---- # log forces done by wizards log_forces yes ! # perform memory allocation tracking (logged on @dump) to help find ! # memory leaks. This really shouldn't be changed while the server ! # is running - it's only useful if you do a full shutdown, turn ! # this on, and then start up. Generally, you want this off. ! mem_check no ### ### Logins *************** *** 517,528 **** # The old daytime directive is better suited to restrict_command # or @command/disable. - # restrict haspower() to see_all players? - haspower_restricted no - # prevent objects from evaluating ufuns on more privileged objects. [++] safer_ufun yes # default whisper to whisper/noisy instead of whisper/silent noisy_whisper no --- 544,555 ---- # The old daytime directive is better suited to restrict_command # or @command/disable. # prevent objects from evaluating ufuns on more privileged objects. [++] safer_ufun yes + # allow functions that have side effects? (e.g. dig(), etc.) + function_side_effects yes + # default whisper to whisper/noisy instead of whisper/silent noisy_whisper no *************** *** 560,565 **** --- 587,597 ---- # should say/pose by a DARK wizard be anonymous ('Someone says...')? full_invis no + + # Are empty attributes preserved? If this is yes, you can do + # &ATTR obj= and obj will have an attribute ATTR set, with an empty value. + # If this is no, that same command would clear the attribute instead. + empty_attrs yes ### ### TinyMUSH compatibility *** 1_7_7.920/src/wiz.c Tue, 27 Apr 2004 13:59:33 -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.9 660) --- 1_7_7.964(w)/src/wiz.c Thu, 06 May 2004 10:38:32 -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.13 660) *************** *** 43,55 **** #include "game.h" #include "command.h" #include "dbdefs.h" - #ifdef USE_MAILER #include "extmail.h" - #endif - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "confmagic.h" --- 43,50 ---- *************** *** 116,122 **** return player; } - #ifdef QUOTA /** Set or check a player's quota. * \verbatim * This implements @quota and @squota. --- 111,116 ---- *************** *** 162,168 **** } /* the quotas of priv'ed players are unlimited and cannot be set. */ ! if (NoQuota(who)) { notify_format(player, T("Objects: %d Limit: UNLIMITED"), owned); return; } --- 156,162 ---- } /* the quotas of priv'ed players are unlimited and cannot be set. */ ! if (NoQuota(who) || !USE_QUOTA) { notify_format(player, T("Objects: %d Limit: UNLIMITED"), owned); return; } *************** *** 265,271 **** else notify_format(player, T("All quotas changed to %d."), limit); } - #endif /* QUOTA */ static int tport_dest_ok(dbref player, dbref victim, dbref dest) --- 259,264 ---- *************** *** 870,883 **** } } - #ifdef QUOTA /* change quota (this command is wiz only and we can assume that * we intend for the recipient to get all the objects, so we * don't do a quota check earlier. */ change_quota(victim, count); change_quota(n_target, -count); - #endif notify_format(player, T("Ownership changed for %d objects."), count); } --- 863,874 ---- *************** *** 978,986 **** void do_debug_examine(dbref player, const char *name) { - #ifdef USE_MAILER MAIL *mp; - #endif dbref thing; if (!Hasprivs(player)) { --- 969,975 ---- *************** *** 1003,1012 **** switch (Typeof(thing)) { case TYPE_PLAYER: - #ifdef USE_MAILER mp = desc_mail(thing); notify_format(player, T("First mail sender: %d"), mp ? mp->from : NOTHING); - #endif case TYPE_THING: notify_format(player, "Location: %d", Location(thing)); notify_format(player, "Home: %d", Home(thing)); --- 992,999 ---- *************** *** 1057,1068 **** if ((thing = noisy_match_result(player, name, NOTYPE, MAT_EVERYTHING)) == NOTHING) return; - #ifdef ONLINE_REG if (Unregistered(thing)) { notify(player, T("You can't grant powers to unregistered players.")); return; } - #endif if (God(thing) && !God(player)) { notify(player, T("God is already all-powerful.")); return; --- 1044,1053 ---- *************** *** 1651,1657 **** #pragma warning( default : 4761) /* Re-enable conversion warning */ #endif - #ifdef QUOTA /* ARGSUSED */ FUNCTION(fun_quota) { --- 1636,1641 ---- *************** *** 1687,1693 **** safe_integer(owned + get_current_quota(who), buff, bp); return; } - #endif /** Modify access rules for a site. * \verbatim --- 1671,1676 ---- *** 1_7_7.920/src/wild.c Thu, 11 Sep 2003 15:26:04 -0500 dunemush (pennmush/b/24_wild.c 1.11.1.1.1.8.1.1.1.4.1.2.1.5 660) --- 1_7_7.964(w)/src/wild.c Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/b/24_wild.c 1.11.1.1.1.8.1.1.1.4.1.2.1.7 660) *************** *** 30,36 **** #include "conf.h" #include "case.h" #include "externs.h" - #include "memcheck.h" #include "mymalloc.h" #include "parse.h" #include "pcre.h" --- 30,35 ---- *************** *** 494,502 **** */ return 0; } - #ifdef MEM_CHECK add_check("pcre"); - #endif /* * Now we try to match the pattern. The relevant fields will * automatically be filled in by this. --- 493,499 ---- *************** *** 571,579 **** */ return 0; } - #ifdef MEM_CHECK add_check("pcre"); - #endif /* * Now we try to match the pattern. The relevant fields will * automatically be filled in by this. --- 568,574 ---- *** 1_7_7.920/src/utils.c Sat, 27 Mar 2004 00:05:26 -0600 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.16 660) --- 1_7_7.964(w)/src/utils.c Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/b/27_utils.c 1.30.1.1.1.18 660) *************** *** 34,42 **** #endif #include "conf.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "match.h" #include "externs.h" #include "mushdb.h" --- 34,39 ---- *************** *** 68,76 **** mush_malloc(size_t size, const char *check) { Malloc_t ptr; - #ifdef MEM_CHECK add_check(check); - #endif ptr = malloc(size); if (ptr == NULL) do_log(LT_ERR, 0, 0, "mush_malloc failed to malloc %d bytes for %s", --- 65,71 ---- *************** *** 88,96 **** mush_free(Malloc_t RESTRICT ptr, const char *RESTRICT check __attribute__ ((__unused__))) { - #ifdef MEM_CHECK del_check(check); - #endif free(ptr); return; } --- 83,89 ---- *************** *** 125,149 **** *attrib = (ATTR *) atr_get(*thing, upcasestr(name)); } void parse_anon_attrib(dbref player, char *str, dbref *thing, ATTR **attrib) { - /* takes a string which is of the format #lambda/code, / or , - * and returns the dbref of the object, and a pointer to the attribute. - */ if (string_prefix(str, "#lambda/")) { unsigned char *t; str += 8; ! *attrib = mush_malloc(sizeof(ATTR), "anon_attr"); ! AL_CREATOR(*attrib) = player; ! AL_NAME(*attrib) = strdup("#lambda"); ! t = compress(str); ! (*attrib)->data = chunk_create(t, u_strlen(t), 0); ! AL_FLAGS(*attrib) = AF_ANON; ! AL_NEXT(*attrib) = NULL; ! *thing = player; ! return; } parse_attrib(player, str, thing, attrib); } --- 118,155 ---- *attrib = (ATTR *) atr_get(*thing, upcasestr(name)); } + /** Parse an attribute or anonymous attribute into dbref and pointer. + * This function takes a string which is of the format #lambda/code, + * / or , and returns the dbref of the object, + * and a pointer to the attribute. + * \param player the executor, for permissions checks. + * \param str string to parse. + * \param thing pointer to address to return dbref parsed, or NOTHING + * if none could be parsed. + * \param attrib pointer to address to return ATTR * of attrib parsed, + * or NULL if none could be parsed. + */ void parse_anon_attrib(dbref player, char *str, dbref *thing, ATTR **attrib) { if (string_prefix(str, "#lambda/")) { unsigned char *t; str += 8; ! if (!*str) { ! *attrib = NULL; ! *thing = NOTHING; ! } else { ! *attrib = mush_malloc(sizeof(ATTR), "anon_attr"); ! AL_CREATOR(*attrib) = player; ! AL_NAME(*attrib) = strdup("#lambda"); ! t = compress(str); ! (*attrib)->data = chunk_create(t, u_strlen(t), 0); ! AL_FLAGS(*attrib) = AF_ANON; ! AL_NEXT(*attrib) = NULL; ! *thing = player; ! return; ! } } parse_attrib(player, str, thing, attrib); } *** 1_7_7.920/src/timer.c Wed, 29 Oct 2003 14:21:02 -0600 dunemush (pennmush/b/29_timer.c 1.29.1.7.1.14 660) --- 1_7_7.964(w)/src/timer.c Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/b/29_timer.c 1.29.1.7.1.17 660) *************** *** 34,42 **** #include "flags.h" #include "externs.h" #include "access.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "log.h" #include "game.h" #include "help.h" --- 34,39 ---- *************** *** 123,131 **** int actual; ATTR *aptr; lock_list *lptr; - #ifdef USE_MAILER MAIL *mp; - #endif if (db_top == 0) return; --- 120,126 ---- *************** *** 139,151 **** for (lptr = Locks(end_obj); lptr; lptr = L_NEXT(lptr)) if (L_KEY(lptr) != NULL_CHUNK_REFERENCE) actual++; - #ifdef USE_MAILER if (IsPlayer(end_obj)) { for (mp = find_exact_starting_point(end_obj); mp; mp = mp->next) if (mp->msgid != NULL_CHUNK_REFERENCE) actual++; } - #endif end_obj = (end_obj + 1) % db_top; } while (actual < amount && end_obj != start_obj); --- 134,144 ---- *************** *** 179,185 **** refs[actual] = &(lptr->key); actual++; } - #ifdef USE_MAILER if (IsPlayer(start_obj)) { for (mp = find_exact_starting_point(start_obj); mp; mp = mp->next) if (mp->msgid != NULL_CHUNK_REFERENCE) { --- 172,177 ---- *************** *** 187,193 **** actual++; } } - #endif start_obj = (start_obj + 1) % db_top; } while (start_obj != end_obj); --- 179,184 ---- *************** *** 256,272 **** /* Database dump routines */ if (options.dump_counter <= mudtime) { - #ifdef MEM_CHECK log_mem_check(); - #endif options.dump_counter = options.dump_interval + mudtime; strcpy(ccom, "dump"); fork_and_dump(1); - #ifdef VACATION_FLAG flag_broadcast(0, "ON-VACATION", "%s", T ("Your ON-VACATION flag is set! If you're back, clear it.")); - #endif } else if (NO_FORK && (options.dump_counter - 60 == mudtime) && *options.dump_warning_1min) { --- 247,259 ---- *** 1_7_7.920/src/help.c Mon, 17 Nov 2003 11:57:56 -0600 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.3.1.19 660) --- 1_7_7.964(w)/src/help.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/f/32_help.c 1.4.1.2.1.1.1.3.2.2.1.1.2.1.1.2.1.2.1.2.1.3.1.21 660) *************** *** 21,27 **** #include "flags.h" #include "dbdefs.h" #include "mymalloc.h" - #include "memcheck.h" #include "confmagic.h" #ifdef macintosh --- 21,26 ---- *************** *** 441,449 **** qsort(topics, num_topics, sizeof(help_indx), topic_cmp); h->entries = num_topics; h->indx = topics; - #ifdef MEM_CHECK add_check("help_index"); - #endif fclose(rfp); do_rawlog(LT_WIZ, T("%d topics indexed."), num_topics); return; --- 440,446 ---- *** 1_7_7.920/src/htab.c Mon, 28 Apr 2003 00:35:06 -0500 dunemush (pennmush/b/30_htab.c 1.8.1.11 660) --- 1_7_7.964(w)/src/htab.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/30_htab.c 1.8.1.13 660) *************** *** 15,21 **** #include "externs.h" #include "htab.h" - #include "memcheck.h" #include "mymalloc.h" #include "confmagic.h" --- 15,20 ---- *************** *** 438,443 **** --- 437,462 ---- return NULL; } + /** Return the first key of a hash table. + * This function is used with hash_nextentry_key() to iterate through a + * hash table. + * \param htab pointer to hash table. + * \return first hash table key. + */ + char * + hash_firstentry_key(HASHTAB *htab) + { + int hval; + + for (hval = 0; hval < htab->hashsize; hval++) + if (htab->buckets[hval]) { + htab->last_hval = hval; + htab->last_entry = htab->buckets[hval]; + return htab->buckets[hval]->key; + } + return NULL; + } + /** Return the next entry of a hash table. * This function is used with hash_firstentry() to iterate through a * hash table. hash_firstentry() must be called before calling *************** *** 463,468 **** --- 482,518 ---- htab->last_hval = hval; htab->last_entry = htab->buckets[hval]; return htab->buckets[hval]->data; + } + hval++; + } + return NULL; + } + + /** Return the next key of a hash table. + * This function is used with hash_firstentry{,_key}() to iterate through a + * hash table. hash_firstentry{,_key}() must be called before calling + * this function. + * \param htab pointer to hash table. + * \return next hash table key. + */ + char * + hash_nextentry_key(HASHTAB *htab) + { + int hval; + HASHENT *hptr; + + hval = htab->last_hval; + hptr = htab->last_entry; + if (hptr->next) { + htab->last_entry = hptr->next; + return hptr->next->key; + } + hval++; + while (hval < htab->hashsize) { + if (htab->buckets[hval]) { + htab->last_hval = hval; + htab->last_entry = htab->buckets[hval]; + return htab->buckets[hval]->key; } hval++; } *** 1_7_7.920/src/strutil.c Fri, 19 Mar 2004 23:41:44 -0600 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1.1.1.1.21.1.2.1.2.1.14 660) --- 1_7_7.964(w)/src/strutil.c Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/b/33_strutil.c 1.28.1.3.1.3.1.7.2.1.1.2.1.1.1.1.1.1.1.21.1.2.1.2.1.16 660) *************** *** 20,28 **** #include "pueblo.h" #include "parse.h" #include "externs.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "mymalloc.h" #include "log.h" #include "confmagic.h" --- 20,25 ---- *************** *** 65,74 **** #ifdef HAS_STRDUP x = strdup(s); - #ifdef MEM_CHECK if (x) add_check(check); - #endif #else size_t len = strlen(s) + 1; --- 62,69 ---- *** 1_7_7.920/src/speech.c Sun, 28 Mar 2004 23:42:28 -0600 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.1 660) --- 1_7_7.964(w)/src/speech.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/35_speech.c 1.21.1.2.1.3.1.5.1.1.1.7.1.3.1.1.1.8.1.1.1.1.1.1.1.10.1.2.1.13.2.4.1.1.3.1.1.5.1.1.1.6.1.1.1.3 660) *************** *** 25,31 **** #include "parse.h" #include "game.h" #include "pcre.h" - #include "memcheck.h" #include "confmagic.h" int okay_pemit(dbref player, dbref target); --- 25,30 ---- *************** *** 608,636 **** flag_broadcast(mask, 0, "%s %s %s, \"%s\"", prefix, Name(player), target == WALL_ALL ? "shouts" : "says", message); - - /* log it if necessary */ - if (target == WALL_ALL || options.log_walls) { - const char *type = ""; - switch (target) { - case WALL_ALL: - type = "all"; - break; - case WALL_RW: - type = "roywiz"; - break; - case WALL_WIZ: - type = "wiz"; - } - if (pose) - do_log(LT_WIZ, player, NOTHING, "(MSG/%s) %s%s%s", type, - Name(player), gap, message); - else if (emit) - do_log(LT_WIZ, player, NOTHING, "(MSG/%s) %s", type, message); - else - do_log(LT_WIZ, player, NOTHING, "(MSG/%s) %s %s, \"%s\"", type, - Name(player), target == WALL_ALL ? "shouts" : "says", message); - } } /** The page command. --- 607,612 ---- *** 1_7_7.920/src/set.c Wed, 28 Apr 2004 09:04:12 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.1.1.1.1.11.1.1.1.1.1.1.1.1.1.1.1.1.1.29 660) --- 1_7_7.964(w)/src/set.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/38_set.c 1.26.1.5.1.1.2.1.1.1.1.1.1.11.1.1.1.1.1.1.1.1.1.1.1.1.1.30 660) *************** *** 240,248 **** } /* Credit the current owner */ giveto(Owner(thing), Pennies(thing)); - #ifdef QUOTA change_quota(Owner(thing), QUOTA_COST); - #endif } chown_object(player, thing, newowner, preserve); notify(player, T("Owner changed.")); --- 240,246 ---- *** 1_7_7.920/src/predicat.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.6 660) --- 1_7_7.964(w)/src/predicat.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/44_predicat.c 1.1.1.34.1.1.1.3.1.4.2.38.1.7 660) *************** *** 46,54 **** static int grep_helper(dbref player, dbref thing, char const *pattern, ATTR *atr, void *args); void do_grep(dbref player, char *obj, char *lookfor, int flag, int insensitive); - #ifdef QUOTA static int pay_quota(dbref, int); - #endif /* QUOTA */ extern PRIV attr_privs[]; /** A generic function to generate a formatted string. The --- 46,52 ---- *************** *** 472,483 **** return 0; } /* check building quota */ ! #ifdef QUOTA ! if (!NoQuota(who) && !pay_quota(who, QUOTA_COST)) { notify(who, T("Sorry, your building quota has run out.")); return 0; } - #endif /* QUOTA */ /* charge */ payfor(who, pennies); --- 470,479 ---- return 0; } /* check building quota */ ! if (!pay_quota(who, QUOTA_COST)) { notify(who, T("Sorry, your building quota has run out.")); return 0; } /* charge */ payfor(who, pennies); *************** *** 523,530 **** return 0; } - #ifdef QUOTA - /** Retrieve the amount of quote remaining to a player. * Figure out a player's quota. Add the RQUOTA attribute if he doesn't * have one already. This function returns the REMAINING quota, not --- 519,524 ---- *************** *** 543,549 **** /* if he's got an RQUOTA attribute, his remaining quota is that */ a = atr_get_noparent(Owner(who), "RQUOTA"); if (a) ! return (atoi(atr_value(a))); /* else, count up his objects. If he has less than the START_QUOTA, * then his remaining quota is that minus his number of current objects. --- 537,543 ---- /* if he's got an RQUOTA attribute, his remaining quota is that */ a = atr_get_noparent(Owner(who), "RQUOTA"); if (a) ! return parse_integer(atr_value(a)); /* else, count up his objects. If he has less than the START_QUOTA, * then his remaining quota is that minus his number of current objects. *************** *** 563,569 **** (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit), GOD, NOTHING); ! return (limit); } --- 557,563 ---- (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", limit), GOD, NOTHING); ! return limit; } *************** *** 574,583 **** void change_quota(dbref who, int payment) { - /* wizards and royalty don't need a quota */ - if (NoQuota(who)) - return; - (void) atr_add(Owner(who), "RQUOTA", tprintf("%d", get_current_quota(who) + payment), GOD, NOTHING); } --- 568,573 ---- *************** *** 593,613 **** { int curr; - /* wizards and royalty don't need a quota */ - if (NoQuota(who)) - return 1; - /* figure out how much we have, and if it's big enough */ curr = get_current_quota(who); ! if (curr - cost < 0) /* not enough */ return 0; change_quota(who, -cost); return 1; } - #endif /* QUOTA */ /** Is a name in the forbidden names file? * \param name name to check. --- 583,598 ---- { int curr; /* figure out how much we have, and if it's big enough */ curr = get_current_quota(who); ! if (USE_QUOTA && !NoQuota(who) && (curr - cost < 0)) /* not enough */ return 0; change_quota(who, -cost); return 1; } /** Is a name in the forbidden names file? * \param name name to check. *** 1_7_7.920/src/player.c Sat, 24 Apr 2004 08:56:21 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.10 660) --- 1_7_7.964(w)/src/player.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/47_player.c 1.15.1.1.1.1.1.4.1.6.1.1.1.13 660) *************** *** 354,362 **** { dbref player; - #ifdef QUOTA char temp[SBUF_LEN]; - #endif object_flag_type flags; player = new_object(); --- 354,360 ---- *************** *** 382,405 **** (void) atr_add(player, "LASTSITE", host, GOD, NOTHING); (void) atr_add(player, "LASTIP", ip, GOD, NOTHING); (void) atr_add(player, "LASTFAILED", " ", GOD, NOTHING); - #ifdef QUOTA sprintf(temp, "%d", START_QUOTA); (void) atr_add(player, "RQUOTA", temp, GOD, NOTHING); ! #endif /* QUOTA */ ! #ifndef EMPTY_ATTRS ! ! (void) atr_add(player, "ICLOC", " ", GOD, ! AF_MDARK | AF_PRIVATE | AF_WIZARD | AF_NOCOPY); ! #else ! ! (void) atr_add(player, "ICLOC", "", GOD, AF_MDARK | AF_PRIVATE | AF_WIZARD | AF_NOCOPY); - #endif - #ifdef USE_MAILER (void) atr_add(player, "MAILCURF", "0", GOD, AF_LOCKED | AF_NOPROG | AF_WIZARD); add_folder_name(player, 0, "inbox"); - #endif /* link him to PLAYER_START */ PUSH(player, Contents(PLAYER_START)); --- 380,392 ---- (void) atr_add(player, "LASTSITE", host, GOD, NOTHING); (void) atr_add(player, "LASTIP", ip, GOD, NOTHING); (void) atr_add(player, "LASTFAILED", " ", GOD, NOTHING); sprintf(temp, "%d", START_QUOTA); (void) atr_add(player, "RQUOTA", temp, GOD, NOTHING); ! (void) atr_add(player, "ICLOC", EMPTY_ATTRS ? "" : " ", GOD, AF_MDARK | AF_PRIVATE | AF_WIZARD | AF_NOCOPY); (void) atr_add(player, "MAILCURF", "0", GOD, AF_LOCKED | AF_NOPROG | AF_WIZARD); add_folder_name(player, 0, "inbox"); /* link him to PLAYER_START */ PUSH(player, Contents(PLAYER_START)); *** 1_7_7.920/src/parse.c Tue, 02 Mar 2004 17:35:59 -0600 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.2.1.31 660) --- 1_7_7.964(w)/src/parse.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/b/48_parse.c 1.23.1.10.1.2.1.1.1.1.1.2.1.2.1.34 660) *************** *** 30,38 **** #include "pcre.h" #include "flags.h" #include "log.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "mymalloc.h" #include "confmagic.h" --- 30,35 ---- *************** *** 998,1013 **** /* Get the arguments */ temp_eflags = (eflags & ~PE_FUNCTION_MANDATORY) | PE_COMPRESS_SPACES | PE_EVALUATE | PE_FUNCTION_CHECK; ! if (fp->flags & FN_BUILTIN) { ! switch (fp->flags & FN_ARG_MASK) { ! case FN_LITERAL: ! temp_eflags |= PE_LITERAL; ! /* FALL THROUGH */ ! case FN_NOPARSE: ! temp_eflags &= ~(PE_COMPRESS_SPACES | PE_EVALUATE | ! PE_FUNCTION_CHECK); ! break; ! } } denied = !check_func(executor, fp); if (denied) --- 995,1008 ---- /* Get the arguments */ temp_eflags = (eflags & ~PE_FUNCTION_MANDATORY) | PE_COMPRESS_SPACES | PE_EVALUATE | PE_FUNCTION_CHECK; ! switch (fp->flags & FN_ARG_MASK) { ! case FN_LITERAL: ! temp_eflags |= PE_LITERAL; ! /* FALL THROUGH */ ! case FN_NOPARSE: ! temp_eflags &= ~(PE_COMPRESS_SPACES | PE_EVALUATE | ! PE_FUNCTION_CHECK); ! break; } denied = !check_func(executor, fp); if (denied) *** 1_7_7.920/src/memcheck.c Mon, 28 Apr 2003 22:14:16 -0500 dunemush (pennmush/c/1_memcheck.c 1.8.1.6 660) --- 1_7_7.964(w)/src/memcheck.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/1_memcheck.c 1.8.1.9 660) *************** *** 15,25 **** #include #include - #ifdef MEM_CHECK #include "externs.h" #include "dbdefs.h" - #include "memcheck.h" #include "mymalloc.h" #include "log.h" #include "confmagic.h" --- 15,23 ---- *************** *** 49,54 **** --- 47,55 ---- size_t reflen; int cmp; + if (!options.mem_check) + return; + for (loop = my_check; loop; loop = loop->next) { cmp = strcasecmp(ref, loop->ref_name); if (cmp == 0) { *************** *** 79,84 **** --- 80,88 ---- MEM *loop, *prev = NULL; int cmp; + if (!options.mem_check) + return; + for (loop = my_check; loop; loop = loop->next) { cmp = strcasecmp(ref, loop->ref_name); if (cmp == 0) { *************** *** 108,113 **** --- 112,119 ---- { MEM *loop; + if (!options.mem_check) + return; for (loop = my_check; loop; loop = loop->next) { notify_format(player, "%s : %d", loop->ref_name, loop->ref_count); } *************** *** 120,130 **** { MEM *loop; do_rawlog(LT_CHECK, "MEMCHECK dump starts"); for (loop = my_check; loop; loop = loop->next) { do_rawlog(LT_CHECK, "%s : %d", loop->ref_name, loop->ref_count); } do_rawlog(LT_CHECK, "MEMCHECK dump ends"); } - - #endif /* MEM_CHECK */ --- 126,136 ---- { MEM *loop; + if (!options.mem_check) + return; do_rawlog(LT_CHECK, "MEMCHECK dump starts"); for (loop = my_check; loop; loop = loop->next) { do_rawlog(LT_CHECK, "%s : %d", loop->ref_name, loop->ref_count); } do_rawlog(LT_CHECK, "MEMCHECK dump ends"); } *** 1_7_7.920/src/malias.c Mon, 28 Apr 2003 22:03:14 -0500 dunemush (pennmush/c/3_malias.c 1.36.1.6 660) --- 1_7_7.964(w)/src/malias.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/3_malias.c 1.36.1.9 660) *************** *** 60,72 **** #include "flags.h" #include "pueblo.h" #include "log.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "confmagic.h" - #ifdef MAIL_ALIASES int ma_size = 0; int ma_top = 0; --- 60,68 ---- *************** *** 249,257 **** m->owner = player; m->name = mush_strdup(na, "malias_name"); m->desc = compress(na); - #ifdef MEM_CHECK add_check("malias_desc"); - #endif m->nflags = ALIAS_OWNER | ALIAS_MEMBERS; m->mflags = ALIAS_OWNER; ma_top++; --- 245,251 ---- *************** *** 1024,1032 **** m->owner = getref(fp); m->name = mush_strdup(getstring_noalloc(fp), "malias_name"); m->desc = compress(getstring_noalloc(fp)); - #ifdef MEM_CHECK add_check("malias_desc"); - #endif m->nflags = getref(fp); m->mflags = getref(fp); --- 1018,1024 ---- *************** *** 1074,1104 **** putref(fp, m->members[j]); } putstring(fp, "*** End of MALIAS ***"); - /* putstring() of fputs() ???? - * Stupid thing to do. Someone sets a malias desc of "*** End of MALIAS ***" - * and then that maildb is read into a mush without MAIL_ALIAS, and bad - * stuff happens. It's rare, but it might happen. Will fix later. */ } - - - - #else /* MAIL_ALIASES */ - - /** Dummy function to read and discard malias data in a maildb. - * When MAIL_ALIASES isn't defined, we use this. - * \param fp file pointer to read from. - */ - void - load_malias(FILE * fp) - { /* Skip mail aliases, */ - char buffer[BUFFER_LEN]; - char *s; - - s = fgets(buffer, sizeof(buffer), fp); - - while (s && strcmp(buffer, "\"*** End of MALIAS ***\"\n") != 0) { - s = fgets(buffer, sizeof(buffer), fp); - } - } - - #endif /* MAIL_ALIASES */ --- 1066,1069 ---- *** 1_7_7.920/src/look.c Sat, 20 Mar 2004 02:18:06 -0600 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.26 660) --- 1_7_7.964(w)/src/look.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/4_look.c 1.21.1.2.1.9.1.1.1.1.1.27 660) *************** *** 21,29 **** #include "externs.h" #include "ansi.h" #include "pueblo.h" - #ifdef CHAT_SYSTEM #include "extchat.h" - #endif #include "game.h" #include "command.h" #include "parse.h" --- 21,27 ---- *************** *** 771,779 **** } notify_format(player, T("Powers: %s"), power_description(player, thing)); - #ifdef CHAT_SYSTEM notify(player, channel_description(thing)); - #endif /* CHAT_SYSTEM */ notify_format(player, T("Warnings checked: %s"), unparse_warnings(thing)); --- 769,775 ---- *** 1_7_7.920/src/log.c Mon, 11 Aug 2003 15:42:46 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.5 660) --- 1_7_7.964(w)/src/log.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/5_log.c 1.10.1.2.2.4.1.1.2.2.1.9 660) *************** *** 27,38 **** #include "externs.h" #include "flags.h" #include "dbdefs.h" #include "log.h" #include "confmagic.h" static char *quick_unparse(dbref object); static void start_log(FILE ** fp, const char *filename); ! static void end_log(FILE * fp); #ifdef macintosh #include "PMInit.h" --- 27,41 ---- #include "externs.h" #include "flags.h" #include "dbdefs.h" + #include "htab.h" #include "log.h" #include "confmagic.h" static char *quick_unparse(dbref object); static void start_log(FILE ** fp, const char *filename); ! static void end_log(const char *filename); ! ! HASHTAB htab_logfiles; #ifdef macintosh #include "PMInit.h" *************** *** 75,97 **** start_log(FILE ** fp, const char *filename) { char newfilename[256] = "\0"; ! /* Must use a buffer for MacOS file path conversion */ ! strncpy(newfilename, filename, 256); #ifdef macintosh ! /* Convert file path from a UNIX style one to a MacOS one */ ! PMConvertPath((char *) newfilename, (char *) newfilename, 256); ! *fp = fopen(newfilename, "ab"); #else ! *fp = fopen(newfilename, "a"); #endif ! if (*fp == NULL) { ! fprintf(stderr, T("WARNING: cannot open log %s\n"), newfilename); ! *fp = stderr; } - fprintf(*fp, "START OF LOG.\n"); - fflush(*fp); } /** Open all logfiles. --- 78,118 ---- start_log(FILE ** fp, const char *filename) { char newfilename[256] = "\0"; + static int ht_initialized = 0; + FILE *f; + + if (!filename || !*filename) { + *fp = stderr; + } else { + if (!ht_initialized) { + hashinit(&htab_logfiles, 8, sizeof(FILE *)); + ht_initialized = 1; + } + if ((f = (FILE *) hashfind(strupper(filename), &htab_logfiles))) { + /* We've already opened this file, so just use that pointer */ + *fp = f; + } else { ! /* Must use a buffer for MacOS file path conversion */ ! strncpy(newfilename, filename, 256); #ifdef macintosh ! /* Convert file path from a UNIX style one to a MacOS one */ ! PMConvertPath((char *) newfilename, (char *) newfilename, 256); ! *fp = fopen(newfilename, "ab"); #else ! *fp = fopen(newfilename, "a"); #endif ! if (*fp == NULL) { ! fprintf(stderr, T("WARNING: cannot open log %s\n"), newfilename); ! *fp = stderr; ! } else { ! hashadd(strupper(filename), (void *) *fp, &htab_logfiles); ! fprintf(*fp, "START OF LOG.\n"); ! fflush(*fp); ! } ! } } } /** Open all logfiles. *************** *** 99,122 **** void start_all_logs(void) { - #ifndef SINGLE_LOGFILE start_log(&connlog_fp, CONNLOG); start_log(&checklog_fp, CHECKLOG); start_log(&wizlog_fp, WIZLOG); start_log(&tracelog_fp, TRACELOG); start_log(&cmdlog_fp, CMDLOG); - #else - connlog_fp = checklog_fp = wizlog_fp = tracelog_fp = cmdlog_fp = stderr; - #endif /* SINGLE_LOGFILE */ } static void ! end_log(FILE * fp) { ! if (fp != stderr) { fprintf(fp, "END OF LOG.\n"); fflush(fp); fclose(fp); } } --- 120,143 ---- void start_all_logs(void) { start_log(&connlog_fp, CONNLOG); start_log(&checklog_fp, CHECKLOG); start_log(&wizlog_fp, WIZLOG); start_log(&tracelog_fp, TRACELOG); start_log(&cmdlog_fp, CMDLOG); } static void ! end_log(const char *filename) { ! FILE *fp; ! if (!filename || !*filename) ! return; ! if ((fp = (FILE *) hashfind(strupper(filename), &htab_logfiles))) { fprintf(fp, "END OF LOG.\n"); fflush(fp); fclose(fp); + hashdelete(strupper(filename), &htab_logfiles); } } *************** *** 125,138 **** void end_all_logs(void) { ! #ifndef SINGLE_LOGFILE ! /* close up the log files */ ! end_log(connlog_fp); ! end_log(checklog_fp); ! end_log(wizlog_fp); ! end_log(tracelog_fp); ! end_log(cmdlog_fp); ! #endif /* SINGLE_LOGFILE */ } --- 146,158 ---- void end_all_logs(void) { ! char *name, *next; ! name = hash_firstentry_key(&htab_logfiles); ! while (name) { ! next = hash_nextentry_key(&htab_logfiles); ! end_log(name); ! name = next; ! } } *************** *** 168,191 **** case LT_ERR: f = stderr; break; case LT_CMD: f = cmdlog_fp; break; case LT_WIZ: f = wizlog_fp; break; case LT_CONN: f = connlog_fp; break; case LT_TRACE: f = tracelog_fp; break; case LT_CHECK: f = checklog_fp; break; - case LT_HUH: - f = cmdlog_fp; - break; default: f = stderr; break; --- 188,214 ---- case LT_ERR: f = stderr; break; + case LT_HUH: case LT_CMD: + start_log(&cmdlog_fp, CMDLOG); f = cmdlog_fp; break; case LT_WIZ: + start_log(&wizlog_fp, WIZLOG); f = wizlog_fp; break; case LT_CONN: + start_log(&connlog_fp, CONNLOG); f = connlog_fp; break; case LT_TRACE: + start_log(&tracelog_fp, TRACELOG); f = tracelog_fp; break; case LT_CHECK: + start_log(&checklog_fp, CHECKLOG); f = checklog_fp; break; default: f = stderr; break; *************** *** 312,342 **** } switch (logtype) { case LT_CONN: ! end_log(connlog_fp); unlink(CONNLOG); start_log(&connlog_fp, CONNLOG); do_log(LT_ERR, player, NOTHING, T("Connect log wiped.")); break; case LT_CHECK: ! end_log(checklog_fp); unlink(CHECKLOG); start_log(&checklog_fp, CHECKLOG); do_log(LT_ERR, player, NOTHING, T("Checkpoint log wiped.")); break; case LT_CMD: ! end_log(cmdlog_fp); unlink(CMDLOG); start_log(&cmdlog_fp, CMDLOG); do_log(LT_ERR, player, NOTHING, T("Command log wiped.")); break; case LT_TRACE: ! end_log(tracelog_fp); unlink(TRACELOG); start_log(&tracelog_fp, TRACELOG); do_log(LT_ERR, player, NOTHING, T("Trace log wiped.")); break; case LT_WIZ: ! end_log(wizlog_fp); unlink(WIZLOG); start_log(&wizlog_fp, WIZLOG); do_log(LT_ERR, player, NOTHING, T("Wizard log wiped.")); --- 335,365 ---- } switch (logtype) { case LT_CONN: ! end_log(CONNLOG); unlink(CONNLOG); start_log(&connlog_fp, CONNLOG); do_log(LT_ERR, player, NOTHING, T("Connect log wiped.")); break; case LT_CHECK: ! end_log(CHECKLOG); unlink(CHECKLOG); start_log(&checklog_fp, CHECKLOG); do_log(LT_ERR, player, NOTHING, T("Checkpoint log wiped.")); break; case LT_CMD: ! end_log(CMDLOG); unlink(CMDLOG); start_log(&cmdlog_fp, CMDLOG); do_log(LT_ERR, player, NOTHING, T("Command log wiped.")); break; case LT_TRACE: ! end_log(TRACELOG); unlink(TRACELOG); start_log(&tracelog_fp, TRACELOG); do_log(LT_ERR, player, NOTHING, T("Trace log wiped.")); break; case LT_WIZ: ! end_log(WIZLOG); unlink(WIZLOG); start_log(&wizlog_fp, WIZLOG); do_log(LT_ERR, player, NOTHING, T("Wizard log wiped.")); *** 1_7_7.920/src/lock.c Tue, 17 Feb 2004 15:49:21 -0600 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.14 660) --- 1_7_7.964(w)/src/lock.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/6_lock.c 1.17.1.13.1.1.1.1.1.15 660) *************** *** 44,52 **** #include "log.h" #include "flags.h" #include "dbdefs.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "mymalloc.h" #include "strtree.h" #include "privtab.h" --- 44,49 ---- *** 1_7_7.920/src/ident.c Mon, 29 Sep 2003 16:37:45 -0500 dunemush (pennmush/c/8_ident.c 1.19.1.4.1.14 660) --- 1_7_7.964(w)/src/ident.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/8_ident.c 1.19.1.4.1.15 660) *************** *** 59,65 **** #include "attrib.h" #include "ident.h" #include "mymalloc.h" - #include "memcheck.h" #include "externs.h" #include "mysocket.h" #include "confmagic.h" --- 59,64 ---- *** 1_7_7.920/src/game.c Sat, 27 Mar 2004 00:04: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.4 660) --- 1_7_7.964(w)/src/game.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/10_game.c 1.50.1.8.1.1.1.1.2.1.1.1.2.1.1.4.1.1.1.1.1.1.1.1.1.1.2.1.1.2.1.1.1.1.1.1.1.2.1.1.1.2.1.1.1.1.1.1.1.1.1.5.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.12.1.3.1.7.1.2.2.1.1.7 660) *************** *** 51,65 **** #include "attrib.h" #include "match.h" #include "case.h" - #ifdef USE_MAILER #include "extmail.h" - #endif - #ifdef CHAT_SYSTEM #include "extchat.h" - #endif - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #ifdef HAS_OPENSSL #include "myssl.h" #endif --- 51,58 ---- *************** *** 398,404 **** perror(realtmpfl); longjmp(db_err, 1); } - #ifdef USE_MAILER sprintf(realdumpfile, "%s%s", options.mail_db, options.compresssuff); strcpy(tmpfl, make_new_epoch_file(options.mail_db, epoch)); sprintf(realtmpfl, "%s%s", tmpfl, options.compresssuff); --- 391,396 ---- *************** *** 418,425 **** longjmp(db_err, 1); } } - #endif /* USE_MAILER */ - #ifdef CHAT_SYSTEM sprintf(realdumpfile, "%s%s", options.chatdb, options.compresssuff); strcpy(tmpfl, make_new_epoch_file(options.chatdb, epoch)); sprintf(realtmpfl, "%s%s", tmpfl, options.compresssuff); --- 410,415 ---- *************** *** 437,443 **** perror(realtmpfl); longjmp(db_err, 1); } - #endif /* CHAT_SYSTEM */ time(&last_dump_time); } --- 427,432 ---- *************** *** 496,507 **** } else { do_rawlog(LT_ERR, T("DUMPING: %s"), panicfile); db_write(f, DBF_PANIC); - #ifdef USE_MAILER dump_mail(f); - #endif - #ifdef CHAT_SYSTEM save_chatdb(f); - #endif fclose(f); do_rawlog(LT_ERR, T("DUMPING: %s (done)"), panicfile); _exit(136); --- 485,492 ---- *************** *** 786,794 **** FILE *f; int c; const char *infile, *outfile; - #ifdef USE_MAILER const char *mailfile; - #endif int panicdb; #ifdef WIN32 --- 771,777 ---- *************** *** 800,808 **** infile = restarting ? options.output_db : options.input_db; outfile = options.output_db; - #ifdef USE_MAILER mailfile = options.mail_db; - #endif strcpy(dumpfile, outfile); /* read small text files into cache */ --- 783,789 ---- *************** *** 875,881 **** if (!GoodObject(GOD) || (!IsPlayer(GOD))) do_rawlog(LT_ERR, T("WARNING: God (#%d) is NOT a player."), GOD); - #ifdef USE_MAILER /* read mail database */ if (panicdb) { do_rawlog(LT_ERR, T("LOADING: Trying to get mail from %s"), infile); --- 856,861 ---- *************** *** 898,906 **** db_close(f); } } - #endif /* USE_MAILER */ - #ifdef CHAT_SYSTEM init_chatdb(); if (panicdb) { --- 878,884 ---- *************** *** 925,931 **** } } } - #endif if (panicdb) db_close(f); --- 903,908 ---- *************** *** 2259,2268 **** } #endif - #ifdef MEM_CHECK if (God(player)) list_mem_check(player); - #endif } static char * --- 2236,2243 ---- *** 1_7_7.920/src/funufun.c Thu, 13 Nov 2003 07:48:17 -0600 dunemush (pennmush/c/11_funufun.c 1.19 660) --- 1_7_7.964(w)/src/funufun.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/11_funufun.c 1.21 660) *************** *** 66,87 **** PT_DEFAULT, pe_info); *s = '\0'; ! #ifdef FUNCTION_SIDE_EFFECTS ! /* The security hole created by function side effects is too great ! * to allow a see_all player to evaluate functions from someone else's ! * standpoint. We require control. ! */ ! if (((obj = match_thing(executor, name)) == NOTHING) ! || !controls(executor, obj)) ! obj = executor; ! #else ! /* In order to evaluate from something else's viewpoint, you ! * must control it, or be able to see_all. ! */ ! if (((obj = match_thing(executor, name)) == NOTHING) ! || (!controls(executor, obj) && !See_All(executor))) ! obj = executor; ! #endif p = args[1]; process_expression(buff, bp, &p, obj, executor, enactor, PE_DEFAULT, --- 66,87 ---- PT_DEFAULT, pe_info); *s = '\0'; ! if (FUNCTION_SIDE_EFFECTS) { ! /* The security hole created by function side effects is too great ! * to allow a see_all player to evaluate functions from someone else's ! * standpoint. We require control. ! */ ! if (((obj = match_thing(executor, name)) == NOTHING) ! || !controls(executor, obj)) ! obj = executor; ! } else { ! /* In order to evaluate from something else's viewpoint, you ! * must control it, or be able to see_all. ! */ ! if (((obj = match_thing(executor, name)) == NOTHING) ! || (!controls(executor, obj) && !See_All(executor))) ! obj = executor; ! } p = args[1]; process_expression(buff, bp, &p, obj, executor, enactor, PE_DEFAULT, *** 1_7_7.920/src/funlist.c Sat, 27 Mar 2004 00:05:26 -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.2 660) --- 1_7_7.964(w)/src/funlist.c Thu, 06 May 2004 10:38:31 -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.4 660) *************** *** 15,21 **** #include "externs.h" #include "parse.h" #include "function.h" - #include "memcheck.h" #include "mymalloc.h" #include "pcre.h" #include "match.h" --- 15,20 ---- *************** *** 2749,2757 **** safe_str(errptr, buff, bp); return; } - #ifdef MEM_CHECK add_check("pcre"); - #endif /* If we're going to match the pattern multiple times, let's study it. */ if (all) { --- 2748,2754 ---- *************** *** 2762,2771 **** safe_str(errptr, buff, bp); return; } - #ifdef MEM_CHECK if (study != NULL) add_check("pcre.extra"); - #endif } len = strlen(prebuf); start = prebuf; --- 2759,2766 ---- *************** *** 2872,2880 **** safe_str(errptr, buff, bp); return; } - #ifdef MEM_CHECK add_check("pcre"); - #endif subpatterns = pcre_exec(re, NULL, args[0], arglens[0], 0, 0, offsets, 99); safe_integer(subpatterns >= 0, buff, bp); --- 2867,2873 ---- *************** *** 2948,2956 **** safe_str(errptr, buff, bp); return; } - #ifdef MEM_CHECK add_check("pcre"); - #endif reharg.study = pcre_study(reharg.re, 0, &errptr); if (errptr != NULL) { --- 2941,2947 ---- *************** *** 2959,2968 **** mush_free(reharg.re, "pcre"); return; } - #ifdef MEM_CHECK if (reharg.study) add_check("pcre.extra"); - #endif reharg.buff = buff; reharg.bp = bp; --- 2950,2957 ---- *************** *** 3034,3042 **** safe_str(errptr, buff, bp); return; } - #ifdef MEM_CHECK add_check("pcre"); - #endif study = pcre_study(re, 0, &errptr); if (errptr != NULL) { --- 3023,3029 ---- *************** *** 3045,3054 **** mush_free(re, "pcre"); return; } - #ifdef MEM_CHECK if (study) add_check("pcre.extra"); - #endif do { r = split_token(&s, sep); --- 3032,3039 ---- *** 1_7_7.920/src/fundb.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.33 660) --- 1_7_7.964(w)/src/fundb.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/17_fundb.c 1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.7.1.3.1.3.1.3.1.2.1.2.1.3.2.1.2.1.2.1.1.1.1.4.1.1.1.1.1.1.1.1.1.1.1.3.1.1.2.2.2.1.1.1.1.1.1.36 660) *************** *** 21,29 **** #include "game.h" #include "mushdb.h" #include "privtab.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "lock.h" #include "log.h" #include "attrib.h" --- 21,26 ---- *************** *** 262,270 **** return; } tp = tbuf = safe_atr_value(a); - #ifdef MEM_CHECK add_check("fun_eval.attr_value"); - #endif process_expression(buff, bp, &tp, thing, executor, executor, PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); --- 259,265 ---- *************** *** 304,312 **** return; } tp = tbuf = safe_atr_value(a); - #ifdef MEM_CHECK add_check("fun_eval.attr_value"); - #endif process_expression(buff, bp, &tp, thing, executor, executor, PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) tbuf, "fun_eval.attr_value"); --- 299,305 ---- *************** *** 343,351 **** } /* Ok, we've got it */ sp = sbuf = safe_atr_value(attrib); - #ifdef MEM_CHECK add_check("fun_edefault.attr_value"); - #endif process_expression(buff, bp, &sp, thing, executor, executor, PE_DEFAULT, PT_DEFAULT, pe_info); mush_free((Malloc_t) sbuf, "fun_edefault.attr_value"); --- 336,342 ---- *************** *** 502,512 **** safe_str(T(e_perm), buff, bp); return; } ! #ifdef FUNCTION_SIDE_EFFECTS ! do_power(executor, args[0], args[1]); ! #else ! safe_str(T(e_disabled), buff, bp); ! #endif return; } it = match_thing(executor, args[0]); --- 493,502 ---- safe_str(T(e_perm), buff, bp); return; } ! if (FUNCTION_SIDE_EFFECTS) ! do_power(executor, args[0], args[1]); ! else ! safe_str(T(e_disabled), buff, bp); return; } it = match_thing(executor, args[0]); *************** *** 1083,1094 **** safe_str(T(e_perm), buff, bp); return; } ! #ifdef FUNCTION_SIDE_EFFECTS ! do_lock(executor, args[0], args[1], ltype); ! #else ! safe_str(T(e_disabled), buff, bp); ! #endif ! return; } if (GoodObject(it) && (ltype != NULL) && Can_Read_Lock(executor, it, ltype)) { --- 1073,1084 ---- safe_str(T(e_perm), buff, bp); return; } ! if (FUNCTION_SIDE_EFFECTS) ! do_lock(executor, args[0], args[1], ltype); ! else { ! safe_str(T(e_disabled), buff, bp); ! return; ! } } if (GoodObject(it) && (ltype != NULL) && Can_Read_Lock(executor, it, ltype)) { *************** *** 1252,1263 **** safe_str(T(e_perm), buff, bp); return; } ! #ifdef FUNCTION_SIDE_EFFECTS ! (void) do_chzone(executor, args[0], args[1], 1); ! #else ! safe_str(T(e_disabled), buff, bp); ! return; ! #endif } it = match_thing(executor, args[0]); if (!GoodObject(it)) --- 1242,1253 ---- safe_str(T(e_perm), buff, bp); return; } ! if (FUNCTION_SIDE_EFFECTS) ! (void) do_chzone(executor, args[0], args[1], 1); ! else { ! safe_str(T(e_disabled), buff, bp); ! return; ! } } it = match_thing(executor, args[0]); if (!GoodObject(it)) *************** *** 1278,1289 **** safe_str(T(e_perm), buff, bp); return; } ! #ifdef FUNCTION_SIDE_EFFECTS ! do_parent(executor, args[0], args[1]); ! #else ! safe_str(T(e_disabled), buff, bp); ! return; ! #endif } it = match_thing(executor, args[0]); if (!GoodObject(it)) --- 1268,1279 ---- safe_str(T(e_perm), buff, bp); return; } ! if (FUNCTION_SIDE_EFFECTS) ! do_parent(executor, args[0], args[1]); ! else { ! safe_str(T(e_disabled), buff, bp); ! return; ! } } it = match_thing(executor, args[0]); if (!GoodObject(it)) *************** *** 1403,1413 **** safe_str(T(e_perm), buff, bp); return; } ! #ifdef FUNCTION_SIDE_EFFECTS ! do_name(executor, args[0], args[1]); ! #else ! safe_str(T(e_disabled), buff, bp); ! #endif return; } it = match_thing(executor, args[0]); --- 1393,1402 ---- safe_str(T(e_perm), buff, bp); return; } ! if (FUNCTION_SIDE_EFFECTS) ! do_name(executor, args[0], args[1]); ! else ! safe_str(T(e_disabled), buff, bp); return; } it = match_thing(executor, args[0]); *************** *** 1605,1611 **** safe_dbref(item, buff, bp); } - #ifdef FUNCTION_SIDE_EFFECTS /* -------------------------------------------------------------------------- * Creation functions: CREATE, PCREATE, OPEN, DIG --- 1594,1599 ---- *************** *** 1616,1621 **** --- 1604,1614 ---- { int cost; + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } + if (!command_check_byname(executor, "@create") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1630,1635 **** --- 1623,1632 ---- /* ARGSUSED */ FUNCTION(fun_pcreate) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@pcreate") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1640,1645 **** --- 1637,1646 ---- /* ARGSUSED */ FUNCTION(fun_open) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@open") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1650,1655 **** --- 1651,1660 ---- /* ARGSUSED */ FUNCTION(fun_dig) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@dig") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1660,1665 **** --- 1665,1674 ---- /* ARGSUSED */ FUNCTION(fun_clone) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@clone") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1675,1680 **** --- 1684,1693 ---- /* ARGSUSED */ FUNCTION(fun_link) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@link") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1685,1690 **** --- 1698,1707 ---- /* ARGSUSED */ FUNCTION(fun_set) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@set") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1695,1700 **** --- 1712,1721 ---- /* ARGSUSED */ FUNCTION(fun_wipe) { + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@wipe") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1712,1717 **** --- 1733,1742 ---- { int silent = 0; int inside = 0; + if (!FUNCTION_SIDE_EFFECTS) { + safe_str(T(e_disabled), buff, bp); + return; + } if (!command_check_byname(executor, "@tel") || fun->flags & FN_NOSIDEFX) { safe_str(T(e_perm), buff, bp); return; *************** *** 1724,1787 **** } - #else - - /* ARGSUSED */ - FUNCTION(fun_create) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_pcreate) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_open) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_dig) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_clone) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_link) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_set) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_wipe) - { - safe_str(T(e_disabled), buff, bp); - } - - /* ARGSUSED */ - FUNCTION(fun_tel) - { - safe_str(T(e_disabled), buff, bp); - } - - #endif /* FUNCTION_SIDE_EFFECTS */ - /* ARGSUSED */ FUNCTION(fun_isdbref) { --- 1749,1754 ---- *************** *** 1809,1817 **** } tp = grep_util(executor, it, args[1], args[2], arglens[2], strcmp(called_as, "GREP")); - #ifdef MEM_CHECK add_check("fun_grep.attr_list"); - #endif safe_str(tp, buff, bp); mush_free((Malloc_t) tp, "fun_grep.attr_list"); } --- 1776,1782 ---- *************** *** 1865,1880 **** status = 1; if (status == 1) { ! #ifdef FUNCTION_SIDE_EFFECTS ! if (!command_check_byname(executor, "@atrlock") || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); return; ! } ! do_atrlock(executor, args[0], args[1]); ! return; ! #else ! safe_str(T(e_disabled), buff, bp); ! #endif return; } --- 1830,1845 ---- status = 1; if (status == 1) { ! if (FUNCTION_SIDE_EFFECTS) { ! if (!command_check_byname(executor, "@atrlock") ! || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; ! } ! do_atrlock(executor, args[0], args[1]); return; ! } else ! safe_str(T(e_disabled), buff, bp); return; } *** 1_7_7.920/src/function.c Sun, 28 Mar 2004 23:42:28 -0600 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.6 660) --- 1_7_7.964(w)/src/function.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/18_function.c 1.29.1.14.1.3.1.6.1.1.1.1.1.14.1.2.1.1.1.7.1.22.1.11.1.3.1.13 660) *************** *** 21,29 **** #include "match.h" #include "htab.h" #include "parse.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "lock.h" #include "flags.h" #include "game.h" --- 21,26 ---- *************** *** 33,38 **** --- 30,36 ---- static void func_hash_insert(const char *name, FUN *func); extern void local_functions(void); + static int apply_restrictions(unsigned int result, const char *restriction); USERFN_ENTRY *userfn_tab; /**< Table of user-defined functions */ HASHTAB htab_function; /**< Function hash table */ *************** *** 209,215 **** {"CASE", fun_switch, 3, INT_MAX, FN_NOPARSE}, {"CASEALL", fun_switch, 3, INT_MAX, FN_NOPARSE}, {"CAT", fun_cat, 1, INT_MAX, FN_REG}, - #ifdef CHAT_SYSTEM {"CEMIT", fun_cemit, 2, 3, FN_REG}, {"CFLAGS", fun_cflags, 1, 2, FN_REG}, {"CHANNELS", fun_channels, 0, 2, FN_REG}, --- 207,212 ---- *************** *** 217,223 **** {"COWNER", fun_cowner, 1, 1, FN_REG}, {"CTITLE", fun_ctitle, 2, 2, FN_REG}, {"CWHO", fun_cwho, 1, 1, FN_REG}, - #endif {"CENTER", fun_center, 2, 3, FN_REG}, {"CHILDREN", fun_lsearch, 1, 1, FN_REG}, {"CHR", fun_chr, 1, 1, FN_REG}, --- 214,219 ---- *************** *** 270,278 **** {"FLIP", fun_flip, 1, 1, FN_REG}, {"FLOORDIV", fun_floordiv, 2, 2, FN_REG}, {"FOLD", fun_fold, 2, 4, FN_REG}, - #ifdef USE_MAILER {"FOLDERSTATS", fun_folderstats, 0, 2, FN_REG}, - #endif {"FOLLOWERS", fun_followers, 1, 1, FN_REG}, {"FOLLOWING", fun_following, 1, 1, FN_REG}, {"FOREACH", fun_foreach, 2, 4, FN_REG}, --- 266,272 ---- *************** *** 351,357 **** {"LVEXITS", fun_lvexits, 1, 1, FN_REG}, {"LVPLAYERS", fun_lvplayers, 1, 1, FN_REG}, {"LWHO", fun_lwho, 0, 0, FN_REG}, - #ifdef USE_MAILER {"MAIL", fun_mail, 0, 2, FN_REG}, {"MAILFROM", fun_mailfrom, 1, 2, FN_REG}, {"MAILSTATS", fun_mailstats, 1, 1, FN_REG}, --- 345,350 ---- *************** *** 360,366 **** {"MAILSTATUS", fun_mailstatus, 1, 2, FN_REG}, {"MAILSUBJECT", fun_mailsubject, 1, 2, FN_REG}, {"MAILTIME", fun_mailtime, 1, 2, FN_REG}, - #endif {"MAP", fun_map, 2, 4, FN_REG}, {"MATCH", fun_match, 2, 3, FN_REG}, {"MATCHALL", fun_matchall, 2, 4, FN_REG}, --- 353,358 ---- *************** *** 419,427 **** {"POSS", fun_poss, 1, 1, FN_REG}, {"POWERS", fun_powers, 1, 2, FN_REG}, {"PUEBLO", fun_pueblo, 1, 1, FN_REG}, - #ifdef QUOTA {"QUOTA", fun_quota, 1, 1, FN_REG}, - #endif {"R", fun_r, 1, 1, FN_REG}, {"RAND", fun_rand, 1, 2, FN_REG}, {"RANDWORD", fun_randword, 1, 2, FN_REG}, --- 411,417 ---- *************** *** 798,803 **** --- 788,839 ---- static Size_t userfn_count = 0; + static int + apply_restrictions(unsigned int result, const char *restriction) + { + int flag, clear = 0; + char *tp; + while (restriction && *restriction) { + if ((tp = strchr(restriction, ' '))) + *tp++ = '\0'; + if (*restriction == '!') { + restriction++; + clear = 1; + } + flag = 0; + if (!strcasecmp(restriction, "nobody")) { + flag = FN_DISABLED; + } else if (string_prefix(restriction, "nogag")) { + flag = FN_NOGAGGED; + } else if (string_prefix(restriction, "nofix")) { + flag = FN_NOFIXED; + } else if (!strcasecmp(restriction, "noguest")) { + flag = FN_NOGUEST; + } else if (!strcasecmp(restriction, "admin")) { + flag = FN_ADMIN; + } else if (!strcasecmp(restriction, "wizard")) { + flag = FN_WIZARD; + } else if (!strcasecmp(restriction, "god")) { + flag = FN_GOD; + } else if (!strcasecmp(restriction, "nosidefx")) { + flag = FN_NOSIDEFX; + } else if (!strcasecmp(restriction, "logargs")) { + flag = FN_LOGARGS; + } else if (!strcasecmp(restriction, "logname")) { + flag = FN_LOGNAME; + } else if (!strcasecmp(restriction, "noparse")) { + flag = FN_NOPARSE; + } + if (clear) + result &= ~flag; + else + result |= flag; + restriction = tp; + } + return result; + } + + /** Given a function name and a restriction, apply the restriction to the * function in addition to whatever its usual restrictions are. * This is used by the configuration file startup in conf.c *************** *** 822,871 **** restrict_function(const char *name, const char *restriction) { FUN *fp; - int clear = 0; - unsigned int flags = 0; - char *tp; if (!name || !*name) return 0; fp = func_hash_lookup(name); if (!fp) return 0; ! while (restriction && *restriction) { ! if ((tp = strchr(restriction, ' '))) ! *tp++ = '\0'; ! ! if (*restriction == '!') { ! restriction++; ! clear = 1; ! } ! if (!strcasecmp(restriction, "nobody")) { ! flags |= FN_DISABLED; ! } else if (string_prefix(restriction, "nogag")) { ! flags |= FN_NOGAGGED; ! } else if (string_prefix(restriction, "nofix")) { ! flags |= FN_NOFIXED; ! } else if (!strcasecmp(restriction, "noguest")) { ! flags |= FN_NOGUEST; ! } else if (!strcasecmp(restriction, "admin")) { ! flags |= FN_ADMIN; ! } else if (!strcasecmp(restriction, "wizard")) { ! flags |= FN_WIZARD; ! } else if (!strcasecmp(restriction, "god")) { ! flags |= FN_GOD; ! } else if (!strcasecmp(restriction, "nosidefx")) { ! flags |= FN_NOSIDEFX; ! } else if (!strcasecmp(restriction, "logargs")) { ! flags |= FN_LOGARGS; ! } else if (!strcasecmp(restriction, "logname")) { ! flags |= FN_LOGNAME; ! } ! if (clear) ! fp->flags &= ~flags; ! else ! fp->flags |= flags; ! restriction = tp; ! } return 1; } --- 858,870 ---- restrict_function(const char *name, const char *restriction) { FUN *fp; if (!name || !*name) return 0; fp = func_hash_lookup(name); if (!fp) return 0; ! fp->flags = apply_restrictions(fp->flags, restriction); return 1; } *************** *** 995,1000 **** --- 994,1003 ---- notify(player, T("Function table full.")); return; } + if (argv[6] && *argv[6]) { + notify(player, T("Expected between 1 and 5 arguments.")); + return; + } /* a completely new entry. First, insert it into general hash table */ fp = (FUN *) mush_malloc(sizeof(FUN), "func_hash.FUN"); fp->name = mush_strdup(name, "func_hash.name"); *************** *** 1016,1022 **** fp->maxargs = 10; } else fp->maxargs = 10; ! fp->flags = 0; hashadd(name, fp, &htab_user_function); /* now add it to the user function table */ --- 1019,1028 ---- fp->maxargs = 10; } else fp->maxargs = 10; ! if (argv[5] && *argv[5]) ! fp->flags = apply_restrictions(0, argv[5]); ! else ! fp->flags = 0; hashadd(name, fp, &htab_user_function); /* now add it to the user function table */ *** 1_7_7.920/src/flags.c Thu, 25 Mar 2004 15:48:37 -0600 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.10 660) --- 1_7_7.964(w)/src/flags.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/20_flags.c 1.1.1.1.1.1.1.1.1.1.1.1.1.6.1.2.1.1.1.1.1.2.2.2.2.1.2.1.1.3.1.2.1.1.1.1.1.1.1.1.1.3.1.9.1.2.2.1.1.2.1.56.1.12.1.1.1.12 660) *************** *** 112,128 **** {"GAGGED", 'g', TYPE_PLAYER, PLAYER_GAGGED, F_WIZARD, F_WIZARD}, {"MYOPIC", 'm', TYPE_PLAYER, PLAYER_MYOPIC, F_ANY, F_ANY}, {"TERSE", 'x', TYPE_PLAYER | TYPE_THING, PLAYER_TERSE, F_ANY, F_ANY}, - #ifdef JURY_OK {"JURY_OK", 'j', TYPE_PLAYER, PLAYER_JURY, F_ROYAL, F_ROYAL}, {"JUDGE", 'J', TYPE_PLAYER, PLAYER_JUDGE, F_ROYAL, F_ROYAL}, - #endif {"FIXED", 'F', TYPE_PLAYER, PLAYER_FIXED, F_WIZARD, F_WIZARD}, - #ifdef ONLINE_REG {"UNREGISTERED", '?', TYPE_PLAYER, PLAYER_UNREG, F_ROYAL, F_ROYAL}, - #endif - #ifdef VACATION_FLAG {"ON-VACATION", 'o', TYPE_PLAYER, PLAYER_VACATION, F_ANY, F_ANY}, - #endif {"SUSPECT", 's', TYPE_PLAYER, PLAYER_SUSPECT, F_WIZARD | F_MDARK, F_WIZARD | F_MDARK}, {"PARANOID", '\0', TYPE_PLAYER, PLAYER_PARANOID, F_ANY | F_ODARK, --- 112,122 ---- *************** *** 137,145 **** {"FLOATING", 'F', TYPE_ROOM, ROOM_FLOATING, F_ANY, F_ANY}, {"JUMP_OK", 'J', TYPE_ROOM, ROOM_JUMP_OK, F_ANY, F_ANY}, {"NO_TEL", 'N', TYPE_ROOM, ROOM_NO_TEL, F_ANY, F_ANY}, - #ifdef UNINSPECTED_FLAG {"UNINSPECTED", 'u', TYPE_ROOM, ROOM_UNINSPECT, F_ROYAL, F_ROYAL}, - #endif {"CLOUDY", 'x', TYPE_EXIT, EXIT_CLOUDY, F_ANY, F_ANY}, {"GOING_TWICE", '\0', NOTYPE, GOING_TWICE, F_INTERNAL | F_DARK, F_INTERNAL | F_DARK}, --- 131,137 ---- *************** *** 194,202 **** {"WATCHER", "MONITOR"}, {"ZONE", "SHARED"}, {"COLOUR", "COLOR"}, - #ifdef JURY_OK {"JURYOK", "JURY_OK"}, - #endif #ifdef VACATION_FLAG {"VACATION", "ON-VACATION"}, #endif --- 186,192 ---- *** 1_7_7.920/src/extmail.c Fri, 27 Feb 2004 15:31:35 -0600 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.10 660) --- 1_7_7.964(w)/src/extmail.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/22_extmail.c 1.44.1.7.1.5.1.9.1.1.1.1.1.15 660) *************** *** 78,86 **** #include "externs.h" #include "match.h" #include "extmail.h" - #ifdef MAIL_ALIASES #include "malias.h" - #endif #include "attrib.h" #include "parse.h" #include "mymalloc.h" --- 78,84 ---- *************** *** 88,96 **** #include "flags.h" #include "log.h" #include "lock.h" #include "confmagic.h" - #ifdef USE_MAILER extern jmp_buf db_err; --- 86,94 ---- #include "flags.h" #include "log.h" #include "lock.h" + #include "command.h" #include "confmagic.h" extern jmp_buf db_err; *************** *** 110,121 **** static void send_mail(dbref player, dbref target, char *subject, char *message, mail_flag flags, int silent, int nosig); - #ifdef MAIL_ALIASES static int send_mail_alias(dbref player, char *aname, char *subject, char *message, mail_flag flags, int silent, int nosig); - #endif static MAIL *find_insertion_point(dbref player); static int get_folder_number(dbref player, char *name); static char *get_folder_name(dbref player, int fld); --- 108,117 ---- *************** *** 710,716 **** desc_mail_set(player, NULL); desc_mail_set(player, find_exact_starting_point(player)); } ! notify(player, T("MAIL: Mailbox purged.")); return; } --- 706,713 ---- desc_mail_set(player, NULL); desc_mail_set(player, find_exact_starting_point(player)); } ! if (command_check_byname(player, "@MAIL")) ! notify(player, T("MAIL: Mailbox purged.")); return; } *************** *** 851,860 **** subject_given = 1; } else message = mb; /* Rewind the pointer to the beginning */ - #ifdef ALLOW_NOSUBJECT - if (!subject_given) - strcpy(sbuf, T("(no subject)")); - #endif /* Parse the player list */ head = tolist; while (head && *head) { --- 848,853 ---- *************** *** 887,896 **** if (!GoodObject(target)) target = short_page(current); if (!GoodObject(target) || !IsPlayer(target)) { - #ifdef MAIL_ALIASES if (!send_mail_alias (player, current, sbuf, message, mail_flags, silent, nosig)) - #endif notify_format(player, T("No such unique player: %s."), current); } else send_mail(player, target, sbuf, message, mail_flags, silent, nosig); --- 880,887 ---- *************** *** 1838,1855 **** int mail_flags = 0; mail_flags += MDBF_SUBJECT; - #ifdef MAIL_ALIASES mail_flags += MDBF_ALIASES; - #endif mail_flags += MDBF_NEW_EOD; mail_flags += MDBF_SENDERCTIME; if (mail_flags) fprintf(fp, "+%d\n", mail_flags); - #ifdef MAIL_ALIASES save_malias(fp); - #endif OUTPUT(fprintf(fp, "%d\n", mdb_top)); --- 1829,1842 ---- *************** *** 2634,2640 **** return 1; } - #ifdef MAIL_ALIASES static int send_mail_alias(dbref player, char *aname, char *subject, char *message, mail_flag flags, int silent, int nosig) --- 2621,2626 ---- *************** *** 2669,2674 **** } return 1; /* Success */ } - #endif /* MAIL_ALIASES */ - - #endif /* USE_MAILER */ --- 2655,2657 ---- *** 1_7_7.920/src/extchat.c Sun, 28 Mar 2004 10:56:14 -0600 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.7 660) --- 1_7_7.964(w)/src/extchat.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/23_extchat.c 1.1.1.1.1.1.1.1.1.2.1.1.1.3.1.1.1.5.1.1.1.1.1.5.1.2.1.3.1.3.1.1.1.4.1.2.1.6.1.2.1.1.2.4.2.9.1.2.1.2.1.3.1.2.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.2.1.1.2.1.1.2.1.1.1.1.1.1.1.1.1.16.1.12 660) *************** *** 35,41 **** #include "command.h" #include "confmagic.h" - #ifdef CHAT_SYSTEM extern jmp_buf db_err; --- 35,40 ---- *************** *** 1822,1829 **** } strcpy(CUtitle(u), title); if (!Quiet(player)) ! notify_format(player, T("Title %s for channel <%s>."), ! *title ? T("set") : T("cleared"), ChanName(c)); return; } --- 1821,1829 ---- } strcpy(CUtitle(u), title); if (!Quiet(player)) ! notify_format(player, T("Title %s for %schannel <%s>."), ! *title ? T("set") : T("cleared"), ! Channel_NoTitles(c) ? "(NoTitles) " : "", ChanName(c)); return; } *************** *** 2711,2726 **** } if (nargs == 2) { ! #ifdef FUNCTION_SIDE_EFFECTS ! if (!command_check_byname(executor, "@clock") || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); return; } - do_chan_lock(executor, args[0], args[1], which_lock); - return; - #else - safe_str(T(e_disabled), buff, bp); - #endif } if (Chan_Can_Decomp(c, executor)) { --- 2711,2726 ---- } if (nargs == 2) { ! if (FUNCTION_SIDE_EFFECTS) { ! if (!command_check_byname(executor, "@clock") || fun->flags & FN_NOSIDEFX) { ! safe_str(T(e_perm), buff, bp); ! return; ! } ! do_chan_lock(executor, args[0], args[1], which_lock); return; + } else { + safe_str(T(e_disabled), buff, bp); } } if (Chan_Can_Decomp(c, executor)) { *************** *** 3233,3237 **** return retval; } - - #endif /* CHAT_SYSTEM */ --- 3233,3235 ---- *** 1_7_7.920/src/destroy.c Wed, 28 Apr 2004 09:04:12 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1.1.1.1.4.1.1.1.1.1.7 660) --- 1_7_7.964(w)/src/destroy.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/24_destroy.c 1.24.2.2.1.3.1.1.1.1.1.1.1.4.1.1.1.1.1.11 660) *************** *** 610,618 **** thing); return; } - #ifdef QUOTA change_quota(Owner(thing), QUOTA_COST); - #endif /* QUOTA */ do_halt(thing, "", thing); /* The equivalent of an @drain/any/all: */ dequeue_semaphores(thing, NULL, INT_MAX, 1, 1); --- 610,616 ---- *************** *** 688,696 **** Owner(thing) = GOD; Parent(thing) = NOTHING; Zone(thing) = NOTHING; - #ifdef CHAT_SYSTEM remove_all_obj_chan(thing); - #endif switch (Typeof(thing)) { /* Make absolutely sure we are removed from Location's content or --- 686,692 ---- *************** *** 820,837 **** char alias[BUFFER_LEN + 1]; /* Clear out mail. */ - #ifdef USE_MAILER do_mail_clear(thing, NULL); do_mail_purge(thing); - #ifdef MAIL_ALIASES malias_cleanup(thing); - #endif - #endif /* Chown any chat channels they own to God */ - #ifdef CHAT_SYSTEM chan_chownall(thing, GOD); - #endif /* Clear out names from the player list */ delete_player(thing, NULL); --- 816,827 ---- *** 1_7_7.920/src/db.c Sun, 25 Apr 2004 18:31:10 -0500 dunemush (pennmush/c/25_db.c 1.26.1.1.1.1.1.6.1.1.1.17 660) --- 1_7_7.964(w)/src/db.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/25_db.c 1.26.1.1.1.1.1.6.1.1.1.20 660) *************** *** 23,31 **** #include "mushdb.h" #include "attrib.h" #include "externs.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "mymalloc.h" #include "game.h" #include "flags.h" --- 23,28 ---- *************** *** 35,43 **** #include "strtree.h" #include "parse.h" #include "htab.h" - #ifdef USE_MAILER #include "extmail.h" - #endif #include "confmagic.h" #ifdef WIN32 --- 32,38 ---- *************** *** 1048,1056 **** DBF_NEW_STRINGS | DBF_TYPE_GARBAGE | DBF_SPLIT_IMMORTAL | DBF_NO_TEMPLE | DBF_SPIFFY_LOCKS; - #ifdef MEM_CHECK log_mem_check(); - #endif loading_db = 1; --- 1043,1049 ---- *************** *** 1253,1261 **** loading_db = 0; fix_free_list(); dbck(); - #ifdef MEM_CHECK log_mem_check(); - #endif return db_top; } } --- 1246,1252 ---- *************** *** 1360,1369 **** add_lock(god, god, Enter_Lock, parse_boolexp(god, "=me", Enter_Lock), -1); add_lock(god, god, Use_Lock, parse_boolexp(god, "=me", Use_Lock), -1); atr_new_add(god, "DESCRIBE", "You see Number One.", god, desc_flags, 1); - #ifdef USE_MAILER atr_new_add(god, "MAILCURF", "0", god, AF_LOCKED | AF_NOPROG | AF_WIZARD, 1); add_folder_name(god, 0, "inbox"); - #endif PUSH(god, Contents(start_room)); add_player(god, NULL); s_Pennies(god, START_BONUS); --- 1351,1358 ---- *** 1_7_7.920/src/cque.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.16 660) --- 1_7_7.964(w)/src/cque.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/28_cque.c 1.36.1.5.1.1.1.1.1.1.1.2.1.6.1.17 660) *************** *** 25,33 **** #include "mushdb.h" #include "match.h" #include "externs.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "parse.h" #include "strtree.h" #include "mymalloc.h" --- 25,30 ---- *** 1_7_7.920/src/conf.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.22 660) --- 1_7_7.964(w)/src/conf.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/31_conf.c 1.41.2.3.1.3.1.2.1.15.1.1.1.1.1.1.1.33 660) *************** *** 65,74 **** , {"mail_database", cf_str, options.mail_db, sizeof options.mail_db, 0, "files"} , - #ifdef CHAT_SYSTEM {"chat_database", cf_str, options.chatdb, sizeof options.chatdb, 0, "files"} , - #endif {"compress_suffix", cf_str, options.compresssuff, sizeof options.compresssuff, 0, "files"} --- 65,72 ---- *************** *** 330,344 **** , {"max_global_fns", cf_int, &options.max_global_fns, 2000, 0, 0} , - #ifdef CHAT_SYSTEM {"max_channels", cf_int, &options.max_channels, 1000, 0, "chat"} , {"max_player_chans", cf_int, &options.max_player_chans, 100, 0, "chat"} , {"chan_cost", cf_int, &options.chan_cost, 10000, 0, "chat"} , - #endif {"log_commands", cf_bool, &options.log_commands, 2, 0, "log"} , --- 328,342 ---- , {"max_global_fns", cf_int, &options.max_global_fns, 2000, 0, 0} , + {"use_quota", cf_bool, &options.use_quota, 2, 0, "limits"} + , {"max_channels", cf_int, &options.max_channels, 1000, 0, "chat"} , {"max_player_chans", cf_int, &options.max_player_chans, 100, 0, "chat"} , {"chan_cost", cf_int, &options.chan_cost, 10000, 0, "chat"} , {"log_commands", cf_bool, &options.log_commands, 2, 0, "log"} , *************** *** 346,352 **** , {"log_forces", cf_bool, &options.log_forces, 2, 0, "log"} , ! {"log_walls", cf_bool, &options.log_walls, 2, 0, "log"} , {"player_flags", cf_flag, options.player_flags, sizeof options.player_flags, --- 344,363 ---- , {"log_forces", cf_bool, &options.log_forces, 2, 0, "log"} , ! {"command_log", cf_str, options.command_log, sizeof options.command_log, 0, ! "log"} ! , ! {"wizard_log", cf_str, options.wizard_log, sizeof options.wizard_log, 0, ! "log"} ! , ! {"checkpt_log", cf_str, options.checkpt_log, sizeof options.checkpt_log, 0, ! "log"} ! , ! {"trace_log", cf_str, options.trace_log, sizeof options.trace_log, 0, ! "log"} ! , ! {"connect_log", cf_str, options.connect_log, sizeof options.connect_log, 0, ! "log"} , {"player_flags", cf_flag, options.player_flags, sizeof options.player_flags, *************** *** 364,369 **** --- 375,383 ---- {"safer_ufun", cf_bool, &options.safer_ufun, 2, 0, "funcs"} , + {"function_side_effects", cf_bool, &options.function_side_effects, 2, 0, + "funcs"} + , {"noisy_whisper", cf_bool, &options.noisy_whisper, 2, 0, "cmds"} , *************** *** 412,417 **** --- 426,433 ---- , {"reverse_shs", cf_bool, &options.reverse_shs, 2, 0, "attribs"} , + {"empty_attrs", cf_bool, &options.empty_attrs, 2, 0, "attribs"} + , {"object_cost", cf_int, &options.object_cost, 10000, 0, "costs"} , {"exit_cost", cf_int, &options.exit_cost, 10000, 0, "costs"} *************** *** 461,466 **** --- 477,484 ---- 2, 0, "net"} , #endif + {"mem_check", cf_bool, &options.mem_check, 2, 0, "log"} + , {NULL, NULL, NULL, 0, 0, NULL} }; *************** *** 479,487 **** /** The table of all configuration groups. */ CONFGROUP confgroups[] = { {"attribs", "Options affecting attributes", 0}, - #ifdef CHAT_SYSTEM {"chat", "Chat system options", 0}, - #endif {"cmds", "Options affecting command behavior", 0}, {"compile", "Compile-time options", 0}, {"cosmetic", "Cosmetic options", 0}, --- 497,503 ---- *************** *** 986,997 **** strcpy(options.input_db, "data/indb"); strcpy(options.output_db, "data/outdb"); strcpy(options.crash_db, "data/PANIC.db"); - #ifdef CHAT_SYSTEM strcpy(options.chatdb, "data/chatdb"); options.chan_cost = 1000; options.max_player_chans = 3; options.max_channels = 200; - #endif strcpy(options.mail_db, "data/maildb"); options.player_start = 0; options.master_room = 2; --- 1002,1011 ---- *************** *** 1023,1028 **** --- 1037,1045 ---- options.func_nest_lim = 50; options.func_invk_lim = 2500; options.call_lim = 0; + options.use_quota = 1; + options.function_side_effects = 1; + options.empty_attrs = 1; strcpy(options.money_singular, "Penny"); strcpy(options.money_plural, "Pennies"); strcpy(options.log_wipe_passwd, "zap!"); *************** *** 1044,1053 **** strcpy(options.down_file[0], "txt/down.txt"); strcpy(options.full_file[0], "txt/full.txt"); strcpy(options.guest_file[0], "txt/guest.txt"); options.log_commands = 0; options.log_huhs = 0; options.log_forces = 1; - options.log_walls = 0; options.support_pueblo = 0; options.login_allow = 1; options.guest_allow = 1; --- 1061,1074 ---- strcpy(options.down_file[0], "txt/down.txt"); strcpy(options.full_file[0], "txt/full.txt"); strcpy(options.guest_file[0], "txt/guest.txt"); + strcpy(options.connect_log, ""); + strcpy(options.command_log, ""); + strcpy(options.trace_log, ""); + strcpy(options.wizard_log, ""); + strcpy(options.checkpt_log, ""); options.log_commands = 0; options.log_huhs = 0; options.log_forces = 1; options.support_pueblo = 0; options.login_allow = 1; options.guest_allow = 1; *************** *** 1141,1146 **** --- 1162,1168 ---- strcpy(options.ssl_ca_file, ""); options.ssl_require_client_cert = 0; #endif + options.mem_check = 0; } /* Limit how many files we can nest */ *************** *** 1325,1333 **** PMConvertPath(options.input_db, options.input_db, 255); PMConvertPath(options.output_db, options.output_db, 255); PMConvertPath(options.crash_db, options.crash_db, 255); - #ifdef CHAT_SYSTEM PMConvertPath(options.chatdb, options.chatdb, 255); - #endif PMConvertPath(options.mail_db, options.mail_db, 255); PMConvertPath(options.connect_file[0], options.connect_file[0], 255); PMConvertPath(options.motd_file[0], options.motd_file[0], 255); --- 1347,1353 ---- *************** *** 1340,1345 **** --- 1360,1366 ---- PMConvertPath(options.guest_file[0], options.guest_file[0], 255); PMConvertPath(options.access_file, options.access_file, 255); PMConvertPath(options.names_file, options.names_file, 255); + /* Don't convert log filenames to MacOS; handled in log.c instead */ #endif } *************** *** 1590,1605 **** notify(player, T(" The MUSH was compiled with SSL support.")); #endif - #ifdef SINGLE_LOGFILE - notify(player, T(" Logging is to a single log file.")); - #else - notify(player, T(" Logging is to multiple log files.")); - #endif - - #ifdef MEM_CHECK - notify(player, " The memory allocation tracker is operating."); - #endif - #ifdef INFO_SLAVE notify(player, T(" DNS and ident lookups are handled by a slave process.")); #else --- 1611,1616 ---- *************** *** 1610,1667 **** notify(player, T(" Windows NT native TCP/IP networking functions in use.")); #else notify(player, T(" BSD sockets networking in use.")); - #endif - - notify(player, T(" Floating point functions are enabled.")); - - #ifdef FUNCTION_SIDE_EFFECTS - notify(player, T(" Side effect functions are enabled.")); - #else - notify(player, T(" Side effect functions are disabled.")); - #endif - - #ifdef USE_MAILER - notify(player, - T(" The extended built-in MUSH mailing system is being used.")); - #ifdef ALLOW_NOSUBJECT - notify(player, - T(" Messages without subject lines have subject (no subject)")); - #else - notify(player, - T - (" Messages without subject lines use the beginning of the message as subject")); - #endif - #else - notify(player, T(" The built-in MUSH mailing system is not being used.")); - #endif - - #ifdef CHAT_SYSTEM - notify(player, T(" The extended chat system is enabled.")); - #else - notify(player, T(" The chat system is disabled.")); - #endif - - #ifdef QUOTA - notify(player, T(" Quota restrictions are being enforced.")); - #endif - - - #ifdef EMPTY_ATTRS - notify(player, T(" Empty attributes are kept.")); - notify(player, T(" Empty attributes are visible.")); - notify(player, T(" Attributes can be deleted.")); - #else - notify(player, T(" Empty attributes are deleted.")); - #endif - - #ifdef ONLINE_REG - notify(player, T(" The UNREGISTERED flag is enabled.")); - #endif - #ifdef VACATION_FLAG - notify(player, T(" The VACATION flag is enabled.")); - #endif - #ifdef UNINSPECTED_FLAG - notify(player, T(" The UNINSPECTED flag is enabled.")); #endif #ifdef HAS_GETDATE --- 1621,1626 ---- *** 1_7_7.920/src/command.c Sun, 28 Mar 2004 23:42:28 -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.47 660) --- 1_7_7.964(w)/src/command.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/36_command.c 1.56.1.1.1.1.1.1.1.2.1.1.1.1.1.5.1.2.1.1.1.1.1.2.1.3.1.10.1.1.3.52 660) *************** *** 34,42 **** #include "flags.h" #include "log.h" #include "cmds.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "confmagic.h" PTAB ptab_command; /**< Prefix table for command names. */ --- 34,39 ---- *************** *** 67,75 **** CMD_T_PLAYER | CMD_T_EQSPLIT, 0, 0}, {"@@", NULL, cmd_null, CMD_T_ANY | CMD_T_NOPARSE, 0, 0}, {"@ALLHALT", NULL, cmd_allhalt, CMD_T_ANY, "WIZARD", "HALT"}, - #ifdef QUOTA {"@ALLQUOTA", "QUIET", cmd_allquota, CMD_T_ANY, "WIZARD", "QUOTA"}, - #endif {"@ATRLOCK", NULL, cmd_atrlock, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, {"@ATRCHOWN", NULL, cmd_atrchown, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, --- 64,70 ---- *************** *** 77,83 **** CMD_T_ANY | CMD_T_EQSPLIT, "WIZARD", 0}, {"@BOOT", "PORT ME", cmd_boot, CMD_T_ANY, 0, 0}, {"@BREAK", NULL, cmd_break, CMD_T_ANY, 0, 0}, - #ifdef CHAT_SYSTEM {"@CEMIT", "NOEVAL NOISY", cmd_cemit, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@CHANNEL", --- 72,77 ---- *************** *** 85,91 **** cmd_channel, CMD_T_ANY | CMD_T_SWITCHES | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, {"@CHAT", NULL, cmd_chat, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, - #endif {"@CHOWNALL", "PRESERVE", cmd_chownall, CMD_T_ANY | CMD_T_EQSPLIT, "WIZARD", 0}, --- 79,84 ---- *************** *** 104,114 **** 0, 0}, {"@CLONE", "PRESERVE", cmd_clone, CMD_T_ANY | CMD_T_NOGAGGED | CMD_T_EQSPLIT, 0, 0}, - #ifdef CHAT_SYSTEM {"@CLOCK", "JOIN SPEAK MOD SEE HIDE", cmd_clock, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, - #endif {"@DBCK", NULL, cmd_dbck, CMD_T_ANY, "WIZARD", 0}, {"@DECOMPILE", "DB TF FLAGS ATTRIBS SKIPDEFAULTS", cmd_decompile, --- 97,105 ---- *************** *** 175,191 **** CMD_T_ANY | CMD_T_NOGAGGED | CMD_T_GOD, 0, 0}, {"@LSET", NULL, cmd_lset, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, - #ifdef USE_MAILER {"@MAIL", "NOEVAL NOSIG STATS DSTATS FSTATS DEBUG NUKE FOLDERS UNFOLDER LIST READ CLEAR UNCLEAR PURGE FILE TAG UNTAG FWD FORWARD SEND SILENT URGENT", cmd_mail, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, - #ifdef MAIL_ALIASES {"@MALIAS", "SET CREATE DESTROY DESCRIBE RENAME STATS CHOWN NUKE ADD REMOVE LIST ALL WHO MEMBERS USEFLAG SEEFLAG", cmd_malias, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, - #endif - #endif {"@MAP", "DELIMIT", cmd_map, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_NOPARSE, 0, 0}, --- 166,178 ---- *************** *** 229,237 **** cmd_power, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS, "WIZARD", 0}, {"@PS", "ALL SUMMARY COUNT QUICK", cmd_ps, CMD_T_ANY, 0, 0}, {"@PURGE", NULL, cmd_purge, CMD_T_ANY, 0, 0}, - #ifdef QUOTA {"@QUOTA", "ALL SET", cmd_quota, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, - #endif {"@READCACHE", NULL, cmd_readcache, CMD_T_ANY, "WIZARD", 0}, {"@RECYCLE", "OVERRIDE", cmd_destroy, CMD_T_ANY | CMD_T_NOGAGGED, 0, 0}, --- 216,222 ---- *************** *** 257,265 **** {"@SWITCH", "NOTIFY FIRST ALL REGEXP", cmd_switch, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_RS_ARGS | CMD_T_RS_NOPARSE | CMD_T_NOGAGGED, 0, 0}, - #ifdef QUOTA {"@SQUOTA", NULL, cmd_squota, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0}, - #endif {"@TELEPORT", "SILENT INSIDE", cmd_teleport, CMD_T_ANY | CMD_T_EQSPLIT | CMD_T_NOGAGGED, 0, 0}, --- 242,248 ---- *************** *** 915,921 **** case EMIT_TOKEN: replacer = "@EMIT"; break; - #ifdef CHAT_SYSTEM case CHAT_TOKEN: #ifdef CHAT_TOKEN_ALIAS case CHAT_TOKEN_ALIAS: --- 898,903 ---- *************** *** 924,930 **** command_parse_free_args; return NULL; } - #endif /* CHAT_SYSTEM */ /* And everything else */ default: /* EXCEPT exits, which have priority. We still pass them through --- 906,911 ---- *************** *** 1662,1670 **** code = safe_atr_value(atr); if (!code) return 1; - #ifdef MEM_CHECK add_check("hook.code"); - #endif save_global_regs("run_hook", origregs); restore_global_regs("hook.regs", saveregs); --- 1643,1649 ---- *** 1_7_7.920/src/cmds.c Sun, 28 Mar 2004 23:42:28 -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.6 660) --- 1_7_7.964(w)/src/cmds.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/37_cmds.c 1.33.1.1.1.2.1.2.2.3.1.1.1.2.1.1.1.3.1.8.1.1.2.2.2.20.1.3.1.7.1.2.1.9 660) *************** *** 57,69 **** do_allhalt(player); } - #ifdef QUOTA COMMAND (cmd_allquota) { do_allquota(player, arg_left, SW_ISSET(sw, SWITCH_QUIET)); } - #endif - COMMAND (cmd_atrlock) { do_atrlock(player, arg_left, arg_right); } --- 57,66 ---- *************** *** 470,476 **** do_lset(player, arg_left, arg_right); } - #ifdef USE_MAILER COMMAND (cmd_mail) { int urgent = SW_ISSET(sw, SWITCH_URGENT); int silent = SW_ISSET(sw, SWITCH_SILENT); --- 467,472 ---- *************** *** 524,530 **** do_mail(player, arg_left, arg_right); /* Does its own gagged check */ } - #ifdef MAIL_ALIASES COMMAND (cmd_malias) { if (SW_ISSET(sw, SWITCH_LIST)) --- 520,525 ---- *************** *** 560,567 **** else do_malias(player, arg_left, arg_right); } - #endif - #endif COMMAND (cmd_map) { unsigned int flags = DOL_MAP; --- 555,560 ---- *************** *** 690,696 **** do_purge(player); } - #ifdef QUOTA COMMAND (cmd_quota) { if (SW_ISSET(sw, SWITCH_ALL)) do_allquota(player, arg_left, (SW_ISSET(sw, SWITCH_QUIET))); --- 683,688 ---- *************** *** 699,705 **** else do_quota(player, arg_left, "", 0); } - #endif /* QUOTA */ COMMAND (cmd_readcache) { do_readcache(player); --- 691,696 ---- *************** *** 832,843 **** SW_ISSET(sw, SWITCH_NOTIFY), SW_ISSET(sw, SWITCH_REGEXP)); } - #ifdef QUOTA COMMAND (cmd_squota) { do_quota(player, arg_left, arg_right, 1); } - #endif COMMAND (cmd_teleport) { if (rhs_present && !*arg_right) --- 823,832 ---- *** 1_7_7.920/src/bsd.c Tue, 27 Apr 2004 14:02:06 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.10 660) --- 1_7_7.964(w)/src/bsd.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/38_bsd.c 1.58.1.11.1.2.1.5.1.7.1.14.1.13.1.9.1.4.1.2.1.12.1.1.1.1.1.2.1.1.1.13.1.1.1.1.1.1.1.1.1.1.1.3.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.3.1.8.2.1.1.1.1.1.1.1.1.2.1.1.1.1.1.1.1.1.1.1.1.1.1.9.1.1.1.25 660) *************** *** 107,112 **** --- 107,113 ---- #include "pueblo.h" #include "parse.h" #include "access.h" + #include "command.h" #include "version.h" #include "patches.h" #include "mysocket.h" *************** *** 114,122 **** #include "strtree.h" #include "log.h" #include "pcre.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #ifdef HAS_OPENSSL #include "myssl.h" #endif --- 115,120 ---- *************** *** 271,276 **** --- 269,275 ---- static const char *create_fail = "Either there is already a player with that name, or that name is illegal."; + static const char *password_fail = "The password is invalid (or missing)."; static const char *register_fail = "Unable to register that player with that email address."; static const char *register_success = *************** *** 296,301 **** --- 295,301 ---- temp = T ("Either there is already a player with that name, or that name is illegal."); + temp = T("The password is invalid (or missing)."); temp = T("Unable to register that player with that email address."); temp = T("Registration successful! You will receive your password by email."); temp = T("Going down - Bye"); *************** *** 600,607 **** time(&mudtime); - start_all_logs(); - /* If we have setlocale, call it to set locale info * from environment variables */ --- 600,605 ---- *************** *** 651,656 **** --- 649,656 ---- confname[BUFFER_LEN - 1] = '\0'; init_game_config(confname); + start_all_logs(); + /* save a file descriptor */ reserve_fd(); #ifndef macintosh *************** *** 1540,1548 **** T("[%d/%s/%s] Logout by %s(#%d) "), d->descriptor, d->addr, d->ip, Name(d->player), d->player); announce_disconnect(d->player); - #ifdef USE_MAILER do_mail_purge(d->player); - #endif if (MAX_LOGINS) { login_number--; if (!under_limit && (login_number < MAX_LOGINS)) { --- 1540,1546 ---- *************** *** 1575,1583 **** d->cmds = 0; d->hide = 0; d->doing[0] = '\0'; - #ifdef USE_MAILER d->mailp = NULL; - #endif welcome_user(d); } --- 1573,1579 ---- *************** *** 1606,1614 **** fcache_dump(d, fcache.quit_fcache, NULL); /* Player was not allowed to log in from the connect screen */ announce_disconnect(d->player); - #ifdef USE_MAILER do_mail_purge(d->player); - #endif } if (MAX_LOGINS) { login_number--; --- 1602,1608 ---- *************** *** 1717,1726 **** d->cmds = 0; d->hide = 0; d->doing[0] = '\0'; - #ifdef USE_MAILER - /* Go find where this player's messages start */ d->mailp = NULL; - #endif strncpy(d->addr, addr, 100); d->addr[99] = '\0'; strncpy(d->ip, ip, 100); --- 1711,1717 ---- *************** *** 2856,2864 **** return 0; } } - #ifdef USE_MAILER d->mailp = find_exact_starting_point(player); - #endif /* check to see if this is a reconnect and also set DARK status */ is_hidden = Can_Hide(player) && Dark(player); --- 2847,2853 ---- *************** *** 2886,2907 **** ModTime(player) = (time_t) 0; announce_connect(player, isnew, num); /* broadcast connect message */ check_last(player, d->addr, d->ip); /* set Last, Lastsite, give paycheck */ - #ifdef USE_MAILER /* Check folder 0, not silently (i.e. Report lack of mail, too) */ queue_eol(d); ! check_mail(player, 0, 0); set_player_folder(player, 0); - #endif do_look_around(player); if (Haven(player)) notify(player, T("Your HAVEN flag is set. You cannot receive pages.")); - #ifdef VACATION_FLAG if (Vacation(player)) { notify(player, T ("Welcome back from vacation! Don't forget to unset your ON-VACATION flag")); } - #endif local_connect(player, isnew, num); return 1; } --- 2875,2893 ---- ModTime(player) = (time_t) 0; announce_connect(player, isnew, num); /* broadcast connect message */ check_last(player, d->addr, d->ip); /* set Last, Lastsite, give paycheck */ /* Check folder 0, not silently (i.e. Report lack of mail, too) */ queue_eol(d); ! if (command_check_byname(player, "@MAIL")) ! check_mail(player, 0, 0); set_player_folder(player, 0); do_look_around(player); if (Haven(player)) notify(player, T("Your HAVEN flag is set. You cannot receive pages.")); if (Vacation(player)) { notify(player, T ("Welcome back from vacation! Don't forget to unset your ON-VACATION flag")); } local_connect(player, isnew, num); return 1; } *************** *** 3029,3035 **** T("[%d/%s/%s] Failed create for '%s' (bad name)."), d->descriptor, d->addr, d->ip, user); } else if (player == AMBIGUOUS) { ! queue_string_eol(d, T(create_fail)); do_log(LT_CONN, 0, 0, T("[%d/%s/%s] Failed create for '%s' (bad password)."), d->descriptor, d->addr, d->ip, user); --- 3015,3021 ---- T("[%d/%s/%s] Failed create for '%s' (bad name)."), d->descriptor, d->addr, d->ip, user); } else if (player == AMBIGUOUS) { ! queue_string_eol(d, T(password_fail)); do_log(LT_CONN, 0, 0, T("[%d/%s/%s] Failed create for '%s' (bad password)."), d->descriptor, d->addr, d->ip, user); *************** *** 3724,3733 **** } else flag_broadcast(0, "MONITOR", "%s %s", T("GAME:"), tbuf1); - #ifdef CHAT_SYSTEM if (ANNOUNCE_CONNECTS) chat_player_announce(player, tbuf1, (num == 1)); - #endif loc = Location(player); if (!GoodObject(loc)) { --- 3710,3717 ---- *************** *** 3868,3877 **** } } - #ifdef CHAT_SYSTEM if (ANNOUNCE_CONNECTS) chat_player_announce(player, tbuf1, 0); - #endif /* Monitor broadcasts */ /* Redundant, but better for translators */ --- 3852,3859 ---- *************** *** 4134,4139 **** --- 4116,4165 ---- } } + /** Return the ip address of the least-idle connection of a player. + * This function performs no permission checking, and returns the + * pointer from the descriptor itself (so don't destroy the result!) + * \param player dbref of player to get ip for. + * \return IP address of player as a string or NULL if not found. + */ + char * + least_idle_ip(dbref player) + { + DESC *d, *match = NULL; + DESC_ITER_CONN(d) { + if ((d->player == player) && (!match || (d->last_time > match->last_time))) + match = d; + } + return match ? (match->ip) : NULL; + } + + /** Return the hostname of the least-idle connection of a player. + * This function performs no permission checking, and returns a static + * string. + * \param player dbref of player to get ip for. + * \return hostname of player as a string or NULL if not found. + */ + char * + least_idle_hostname(dbref player) + { + DESC *d, *match = NULL; + static char hostname[101]; + char *p; + + DESC_ITER_CONN(d) { + if ((d->player == player) && (!match || (d->last_time > match->last_time))) + match = d; + } + if (!match) + return NULL; + strcpy(hostname, match->addr); + if ((p = strchr(hostname, '@'))) { + p++; + return p; + } else + return hostname; + } + /* ARGSUSED */ FUNCTION(fun_doing) { *************** *** 4470,4476 **** } - #ifdef USE_MAILER /** Return the mailp of the player closest in db# to player, * or NULL if there's nobody on-line. * In the current mail system, mail is stored in a linked list, sorted --- 4496,4501 ---- *************** *** 4533,4539 **** } } - #endif /* USE_MAILER */ --- 4558,4563 ---- *************** *** 4856,4864 **** d->raw_input = NULL; d->raw_input_at = NULL; d->quota = options.starting_quota; - #ifdef USE_MAILER d->mailp = NULL; - #endif #ifdef HAS_OPENSSL d->ssl = NULL; d->ssl_state = 0; --- 4880,4886 ---- *************** *** 4901,4911 **** strcpy(poll_msg, getstring_noalloc(f)); first_start_time = getref(f); reboot_count = getref(f) + 1; - #ifdef USE_MAILER DESC_ITER_CONN(d) { d->mailp = find_exact_starting_point(d->player); } - #endif #ifdef HAS_OPENSSL if (SSLPORT) { sslsock = make_socket(SSLPORT, NULL, NULL, SSL_IP_ADDR); --- 4923,4931 ---- *** 1_7_7.920/src/boolexp.c Sat, 20 Mar 2004 02:18:06 -0600 dunemush (pennmush/c/39_boolexp.c 1.1.1.17.1.1.1.13.1.2.1.14 660) --- 1_7_7.964(w)/src/boolexp.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/39_boolexp.c 1.1.1.17.1.1.1.13.1.2.1.18 660) *************** *** 101,107 **** #include "log.h" #include "extchat.h" #include "strtree.h" - #include "memcheck.h" #include "confmagic.h" /* #define DEBUG_BYTECODE */ --- 101,106 ---- *************** *** 180,185 **** --- 179,186 ---- OP_TTYPE, /**< Tests TYPE^ARG */ OP_TPOWER, /**< Tests POWER^ARG */ OP_TCHANNEL, /**< Tests CHANNEL^ARG */ + OP_TIP, /**< Tests IP^ARG */ + OP_THOSTNAME, /**< Tests HOSTNAME^ARG */ OP_LOADS, /**< Load ARG into S */ OP_LOADR, /**< Load ARG into R */ OP_NEGR, /**< Negate R */ *************** *** 235,240 **** --- 236,243 ---- {"POWER", OP_TPOWER}, {"TYPE", OP_TTYPE}, {"CHANNEL", OP_TCHANNEL}, + {"IP", OP_TIP}, + {"HOSTNAME", OP_THOSTNAME}, {NULL, 0} }; *************** *** 504,510 **** r = 0; break; case OP_TCHANNEL: - #ifdef CHAT_SYSTEM { CHAN *chan; boolexp_recursion++; --- 507,512 ---- *************** *** 512,520 **** r = chan && onchannel(player, chan); boolexp_recursion--; } ! #else ! r = 0; ! #endif break; case OP_TTYPE: switch (bytecode[arg]) { --- 514,554 ---- r = chan && onchannel(player, chan); boolexp_recursion--; } ! break; ! case OP_TIP: ! boolexp_recursion++; ! if (!Connected(Owner(player))) ! r = 0; ! else { ! /* We use the attribute for permission checks, but we ! * do the actual boolexp itself with the least idle ! * descriptor's ip address. ! */ ! a = atr_get(Owner(player), "LASTIP"); ! if (!a || !Can_Read_Attr(target, player, a)) ! r = 0; ! else { ! char *p = least_idle_ip(Owner(player)); ! r = p ? quick_wild(bytecode + arg, p) : 0; ! } ! } ! boolexp_recursion--; ! break; ! case OP_THOSTNAME: ! boolexp_recursion++; ! if (!Connected(Owner(player))) ! r = 0; ! else { ! /* See comment for OP_TIP */ ! a = atr_get(Owner(player), "LASTSITE"); ! if (!a || !Can_Read_Attr(target, player, a)) ! r = 0; ! else { ! char *p = least_idle_hostname(Owner(player)); ! r = p ? quick_wild(bytecode + arg, p) : 0; ! } ! } ! boolexp_recursion--; break; case OP_TTYPE: switch (bytecode[arg]) { *************** *** 685,690 **** --- 719,730 ---- case OP_TCHANNEL: safe_format(boolexp_buf, &buftop, "CHANNEL^%s", bytecode + arg); break; + case OP_TIP: + safe_format(boolexp_buf, &buftop, "IP^%s", bytecode + arg); + break; + case OP_THOSTNAME: + safe_format(boolexp_buf, &buftop, "HOSTNAME^%s", bytecode + arg); + break; } } } *************** *** 1524,1529 **** --- 1564,1571 ---- case OP_TPOWER: case OP_TTYPE: case OP_TCHANNEL: + case OP_TIP: + case OP_THOSTNAME: i->arg = blen + offset_to_string(a, i->arg); break; default: *************** *** 1731,1736 **** --- 1773,1784 ---- break; case OP_TCHANNEL: printf("TCHANNEL \"%s\"\n", bytecode + arg); + break; + case OP_TIP: + printf("TIP \"%s\"\n", bytecode + arg); + break; + case OP_THOSTNAME: + printf("THOSTNAME \"%s\"\n", bytecode + arg); break; case OP_LOADS: printf("LOADS \"%s\"\n", bytecode + arg); *** 1_7_7.920/src/attrib.c Fri, 27 Feb 2004 15:31:35 -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.1 660) --- 1_7_7.964(w)/src/attrib.c Thu, 06 May 2004 10:38:31 -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.3 660) *************** *** 16,24 **** #include "dbdefs.h" #include "externs.h" #include "match.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "parse.h" #include "htab.h" #include "privtab.h" --- 16,21 ---- *************** *** 203,212 **** char const *name; ATTR **ins; ! #ifndef EMPTY_ATTRS ! if (!*s) return; - #endif ptr = get_atr_free_list(); atr_free_list = AL_NEXT(ptr); --- 200,207 ---- char const *name; ATTR **ins; ! if (!EMPTY_ATTRS && !*s) return; ptr = get_atr_free_list(); atr_free_list = AL_NEXT(ptr); *************** *** 288,297 **** if (!s) return atr_clr(thing, atr, player); ! #ifndef EMPTY_ATTRS ! if (!*s) return atr_clr(thing, atr, player); - #endif if (!good_atr_name(atr)) return AE_BADNAME; --- 283,290 ---- if (!s) return atr_clr(thing, atr, player); ! if (!EMPTY_ATTRS && !*s) return atr_clr(thing, atr, player); if (!good_atr_name(atr)) return AE_BADNAME; *************** *** 1100,1109 **** int was_hearer; int was_listener; dbref contents; ! #ifndef EMPTY_ATTRS ! if (s && !*s) s = NULL; - #endif if (IsGarbage(thing)) { notify(player, T("Garbage is garbage.")); return 0; --- 1093,1100 ---- int was_hearer; int was_listener; dbref contents; ! if (!EMPTY_ATTRS && s && !*s) s = NULL; if (IsGarbage(thing)) { notify(player, T("Garbage is garbage.")); return 0; *************** *** 1171,1181 **** return 0; } else if (res == AE_ERROR) { if (*missing_name) { ! if (s ! #ifndef EMPTY_ATTRS ! && *s ! #endif ! ) notify_format(player, T("You must set %s first."), missing_name); else notify_format(player, --- 1162,1168 ---- return 0; } else if (res == AE_ERROR) { if (*missing_name) { ! if (s && (EMPTY_ATTRS || *s)) notify_format(player, T("You must set %s first."), missing_name); else notify_format(player, *** 1_7_7.920/src/access.c Sun, 14 Mar 2004 19:56:40 -0600 dunemush (pennmush/c/43_access.c 1.11.1.2.1.4.1.9 660) --- 1_7_7.964(w)/src/access.c Thu, 06 May 2004 10:38:31 -0500 dunemush (pennmush/c/43_access.c 1.11.1.2.1.4.1.10 660) *************** *** 74,82 **** #endif #include "conf.h" #include "externs.h" - #ifdef MEM_CHECK - #include "memcheck.h" - #endif #include "access.h" #include "mymalloc.h" #include "match.h" --- 74,79 ---- *** 1_7_7.920/hdrs/version.h Wed, 28 Apr 2004 09:46:59 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.33 660) --- 1_7_7.964(w)/hdrs/version.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/c/47_version.h 1.32.1.2.1.7.1.9.1.1.1.17.1.33 660) *************** *** 1,3 **** ! #define VERSION "PennMUSH version 1.7.7 patchlevel 29 [04/28/2004]" ! #define SHORTVN "PennMUSH 1.7.7p29" ! #define NUMVERSION 001007007029 --- 1,3 ---- ! #define VERSION "PennMUSH version 1.7.7 patchlevel 30 [05/06/2004]" ! #define SHORTVN "PennMUSH 1.7.7p30" ! #define NUMVERSION 001007007030 *** 1_7_7.920/hdrs/malias.h Thu, 30 Jan 2003 13:16:01 -0600 dunemush (pennmush/d/5_malias.h 1.17 660) --- 1_7_7.964(w)/hdrs/malias.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/5_malias.h 1.18 660) *************** *** 3,9 **** #ifndef _MALIAS_H #define _MALIAS_H - #ifdef MAIL_ALIASES #define MALIAS_TOKEN '+' /* Initial char for alias names */ --- 3,8 ---- *************** *** 51,57 **** /* We still need this one */ void load_malias(FILE * fp); - - #endif #endif --- 50,54 ---- *** 1_7_7.920/hdrs/game.h Sun, 28 Mar 2004 23:42:28 -0600 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.16 660) --- 1_7_7.964(w)/hdrs/game.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/12_game.h 1.28.1.2.1.1.1.1.1.1.1.7.1.17 660) *************** *** 149,159 **** extern void do_search(dbref player, const char *arg1, char **arg3); extern dbref do_pcreate (dbref creator, const char *player_name, const char *player_password); - #ifdef QUOTA extern void do_quota (dbref player, const char *arg1, const char *arg2, int set_q); extern void do_allquota(dbref player, const char *arg1, int quiet); - #endif extern void do_teleport (dbref player, const char *arg1, const char *arg2, int silent, int inside); extern void do_force(dbref player, const char *what, char *command); --- 149,157 ---- *** 1_7_7.920/hdrs/extmail.h Sat, 05 Jul 2003 15:56:20 -0500 dunemush (pennmush/d/15_extmail.h 1.6.1.10 660) --- 1_7_7.964(w)/hdrs/extmail.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/15_extmail.h 1.6.1.11 660) *************** *** 2,8 **** #ifndef _EXTMAIL_H #define _EXTMAIL_H - #ifdef USE_MAILER /* Some of this isn't implemented yet, but heralds the future! */ #define M_MSGREAD 0x0001 #define M_UNREAD 0x0FFE --- 2,7 ---- *************** *** 105,109 **** extern void desc_mail_set(dbref player, struct mail *mp); extern void desc_mail_clear(void); - #endif /* USE_MAILER */ #endif /* _EXTMAIL_H */ --- 104,107 ---- *** 1_7_7.920/hdrs/externs.h Wed, 28 Apr 2004 08:58:27 -0500 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.5 660) --- 1_7_7.964(w)/hdrs/externs.h Thu, 06 May 2004 10:38:32 -0500 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.9 660) *************** *** 93,98 **** --- 93,100 ---- extern dbref guest_to_connect(dbref player); void dump_reboot_db(void); void close_ssl_connections(void); + char *least_idle_ip(dbref player); + char *least_idle_hostname(dbref player); /* The #defs for our notify_anything hacks.. Errr. Functions */ #define NA_NORELAY 0x0001 *************** *** 133,141 **** extern dbref na_except(dbref current, void *data); extern dbref na_except2(dbref current, void *data); extern dbref na_exceptN(dbref current, void *data); - #ifdef CHAT_SYSTEM extern dbref na_channel(dbref current, void *data); - #endif #define notify(p,m) notify_anything(orator, na_one, &(p), NULL, 0, m) #define notify_must_puppet(p,m) notify_anything(orator, na_one, &(p), NULL, NA_MUST_PUPPET, m) --- 135,141 ---- *************** *** 212,217 **** --- 212,223 ---- extern void do_look_around(dbref player); extern void do_look_at(dbref player, const char *name, int key); + /* From memcheck.c */ + extern void add_check(const char *ref); + extern void del_check(const char *ref); + extern void list_mem_check(dbref player); + extern void log_mem_check(void); + /* From move.c */ extern void enter_room(dbref player, dbref loc, int nomovemsgs); extern int can_move(dbref player, const char *direction); *************** *** 277,286 **** extern void giveto(dbref who, int pennies); extern int payfor(dbref who, int cost); extern int nearby(dbref obj1, dbref obj2); - #ifdef QUOTA extern int get_current_quota(dbref who); extern void change_quota(dbref who, int payment); - #endif extern int ok_name(const char *name); extern int ok_command_name(const char *name); extern int ok_player_name(const char *name, dbref player); --- 283,290 ---- *** 1_7_7.920/hdrs/extchat.h Sat, 20 Mar 2004 02:18:06 -0600 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.1 660) --- 1_7_7.964(w)/hdrs/extchat.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/17_extchat.h 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.2.3.1.1.1.1.2.2.1.9.1.1.1.5.1.2 660) *************** *** 41,47 **** #ifndef __EXTCHAT_H #define __EXTCHAT_H - #ifdef CHAT_SYSTEM #include "boolexp.h" --- 41,46 ---- *************** *** 264,268 **** }; - #endif /* CHAT_SYSTEM */ #endif /* __EXTCHAT_H */ --- 263,266 ---- *** 1_7_7.920/hdrs/dbdefs.h Sat, 20 Mar 2004 01:47:00 -0600 dunemush (pennmush/d/18_dbdefs.h 1.1.1.1.1.1.1.1.1.1.1.2.2.2.1.1.1.1.1.1.2.1.1.22.1.6.1.1 660) --- 1_7_7.964(w)/hdrs/dbdefs.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/18_dbdefs.h 1.1.1.1.1.1.1.1.1.1.1.2.2.2.1.1.1.1.1.1.2.1.1.22.1.6.1.5 660) *************** *** 62,74 **** #define Typeof(x) (Type(x) & ~TYPE_MARKED) /* Check for a specific one */ ! #define IsPlayer(x) (Typeof(x) & TYPE_PLAYER) ! #define IsRoom(x) (Typeof(x) & TYPE_ROOM) ! #define IsThing(x) (Typeof(x) & TYPE_THING) ! #define IsExit(x) (Typeof(x) & TYPE_EXIT) /* Was Destroyed() */ ! #define IsGarbage(x) (Typeof(x) & TYPE_GARBAGE) ! #define Marked(x) (db[(x)].type & TYPE_MARKED) #define IS(thing,type,flag) \ ((Typeof(thing) == type) && has_flag_by_name(thing,flag,type)) --- 62,74 ---- #define Typeof(x) (Type(x) & ~TYPE_MARKED) /* Check for a specific one */ ! #define IsPlayer(x) (!!(Typeof(x) & TYPE_PLAYER)) ! #define IsRoom(x) (!!(Typeof(x) & TYPE_ROOM)) ! #define IsThing(x) (!!(Typeof(x) & TYPE_THING)) ! #define IsExit(x) (!!(Typeof(x) & TYPE_EXIT)) /* Was Destroyed() */ ! #define IsGarbage(x) (!!(Typeof(x) & TYPE_GARBAGE)) ! #define Marked(x) (!!(db[(x)].type & TYPE_MARKED)) #define IS(thing,type,flag) \ ((Typeof(thing) == type) && has_flag_by_name(thing,flag,type)) *************** *** 83,94 **** #define ZMaster(x) (IS(x, TYPE_PLAYER, "ZONE")) /* 0x800 */ #define Unregistered(x) (IS(x, TYPE_PLAYER, "UNREGISTERED")) #define Fixed(x) (IS(Owner(x), TYPE_PLAYER, "FIXED")) - - #ifdef VACATION_FLAG #define Vacation(x) (IS(x, TYPE_PLAYER, "ON-VACATION")) /* 0x10000 */ - #else - #define Vacation(x) 0 - #endif /* Flags that apply to players, and all their stuff, * so check the Owner() of the object. --- 83,89 ---- *************** *** 119,129 **** #define RoomZTel(x) (IS(x, TYPE_ROOM, "Z_TEL")) /* 0x200 */ #define RoomInhearit(x) (IS(x, TYPE_ROOM, "LISTEN_PARENT")) /* 0x400 */ - #ifdef UNINSPECTED_FLAG #define Uninspected(x) (IS(x, TYPE_ROOM, "UNINSPECTED")) /* 0x1000 */ - #else - #define Uninspected(x) 0 - #endif #define ZTel(x) (ThingZTel(x) || RoomZTel(x)) --- 114,120 ---- *************** *** 294,300 **** #define DOLIST_VISIBLE(var, first, player)\ for((var) = first_visible((player), (first)); GoodObject((var)); (var) = first_visible((player), Next(var))) - #ifdef USE_MAILER /** A mail message. * This structure represents a single mail message in the linked list * of messages that comprises the mail database. Mail messages are --- 285,290 ---- *************** *** 314,320 **** typedef struct mail MAIL; - #endif /* USE_MAILER */ extern const char *EOD; --- 304,309 ---- *** 1_7_7.920/hdrs/conf.h Sun, 25 Apr 2004 19:10:26 -0500 dunemush (pennmush/d/20_conf.h 1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.2.1.1.2.1.2.13.1.4.1.20.1.9 660) --- 1_7_7.964(w)/hdrs/conf.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/20_conf.h 1.1.1.1.1.1.1.1.1.1.1.1.1.2.1.5.1.1.1.1.1.1.1.1.1.2.1.1.2.1.2.13.1.4.1.20.1.15 660) *************** *** 139,150 **** char compressprog[256]; /**< Program to compress database dumps */ char uncompressprog[256]; /**< Program to uncompress database dumps */ char compresssuff[256]; /**< Suffix for compressed dump files */ - #ifdef CHAT_SYSTEM char chatdb[256]; /**< Name of the chat database file */ int max_player_chans; /**< Number of channels a player can create */ int max_channels; /**< Total maximum allowed channels */ int chan_cost; /**< Cost to create a channel */ - #endif char connect_file[2][256]; /**< Names of text and html connection files */ char motd_file[2][256]; /**< Names of text and html motd files */ char wizmotd_file[2][256]; /**< Names of text and html wizmotd files */ --- 139,148 ---- *************** *** 157,163 **** int log_commands; /**< Should we log all commands? */ int log_huhs; /**< Should we log commands that produce a Huh? */ int log_forces; /**< Should we log force commands? */ - int log_walls; /**< Should we log wall commands? */ int support_pueblo; /**< Should the MUSH send Pueblo tags? */ int login_allow; /**< Are mortals allowed to log in? */ int guest_allow; /**< Are guests allowed to log in? */ --- 155,160 ---- *************** *** 254,259 **** --- 251,265 ---- char ssl_ca_file[256]; /**< File to load the CA certs from */ int ssl_require_client_cert; /**< Are clients required to present certs? */ #endif + int mem_check; /**< Turn on the memory allocation checker? */ + int use_quota; /**< Are quotas enabled? */ + int empty_attrs; /**< Are empty attributes preserved? */ + int function_side_effects; /**< Turn on side effect functions? */ + char connect_log[256]; /**< File to log connections */ + char wizard_log[256]; /**< File to log wizard commands */ + char command_log[256]; /**< File to log suspect commands */ + char trace_log[256]; /**< File to log trace data */ + char checkpt_log[256]; /**< File to log checkpoint data */ }; extern OPTTAB options; *************** *** 403,408 **** --- 409,422 ---- #define NEWLINE_ONE_CHAR (options.newline_one_char) #define ONLY_ASCII_NAMES (options.ascii_names) #define MAX_GLOBAL_FNS (options.max_global_fns) + #define USE_QUOTA (options.use_quota) + #define EMPTY_ATTRS (options.empty_attrs) + #define FUNCTION_SIDE_EFFECTS (options.function_side_effects) + #define CONNLOG (options.connect_log) + #define WIZLOG (options.wizard_log) + #define CMDLOG (options.command_log) + #define TRACELOG (options.trace_log) + #define CHECKLOG (options.checkpt_log) #define CHUNK_SWAP_FILE (options.chunk_swap_file) #define CHUNK_CACHE_MEMORY (options.chunk_cache_memory) *** 1_7_7.920/hdrs/htab.h Mon, 28 Apr 2003 00:35:06 -0500 dunemush (pennmush/d/23_htab.h 1.8 660) --- 1_7_7.964(w)/hdrs/htab.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/23_htab.h 1.9 660) *************** *** 53,58 **** --- 53,60 ---- extern void hash_flush(HASHTAB *htab, int size); extern void *hash_firstentry(HASHTAB *htab); extern void *hash_nextentry(HASHTAB *htab); + extern char *hash_firstentry_key(HASHTAB *htab); + extern char *hash_nextentry_key(HASHTAB *htab); extern void hash_stats_header(dbref player); extern void hash_stats(dbref player, HASHTAB *htab, const char *hashname); #endif *** 1_7_7.920/hdrs/atr_tab.h Sun, 15 Feb 2004 13:48:22 -0600 dunemush (pennmush/d/26_atr_tab.h 1.15.1.13 660) --- 1_7_7.964(w)/hdrs/atr_tab.h Thu, 06 May 2004 10:38:32 -0500 dunemush (pennmush/d/26_atr_tab.h 1.15.1.14 660) *************** *** 27,35 **** {"ALFAIL", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"ALIAS", AF_VISUAL | AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, - #ifdef USE_MAILER {"AMAIL", AF_WIZARD | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, - #endif {"AMHEAR", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"AMOVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"ANAME", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, --- 27,33 ---- *************** *** 99,105 **** {"LEAVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"LFAIL", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"LISTEN", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, - #ifdef USE_MAILER {"MAILCURF", AF_WIZARD | AF_NOPROG | AF_LOCKED | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"MAILFILTERS", AF_WIZARD | AF_NOPROG | AF_LOCKED | AF_PREFIXMATCH, --- 97,102 ---- *************** *** 107,113 **** {"MAILFOLDERS", AF_WIZARD | AF_NOPROG | AF_LOCKED | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"MAILSIGNATURE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, - #endif {"MOVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, {"NAMEACCENT", AF_NOPROG | AF_VISUAL | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, --- 104,109 ---- *** 1_7_7.920/options.h.dist Sat, 24 Apr 2004 08:56:21 -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.1 600) --- 1_7_7.964(w)/options.h.dist Thu, 06 May 2004 00:30:20 -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) *************** *** 83,102 **** /*------------------------- Other internals ----------------------*/ - - /* Define this if you don't wish your log file to be split up into several - * components. This saves on file descriptors and makes it easy to tail -f - * the log, but is inconvenient for quick scanning. - */ - /* #define SINGLE_LOGFILE /* */ - - /* Defining this adds a simple tracking allocator of allocs and frees that - * keeps ref counts of what sort of memory is allocated, and how many. - * Good for testing for Memory leaks. Don't, however, define this unless - * 1. It's really necessary. 2. You know what you're doing. - */ - /* #define MEM_CHECK /* */ - /* If defined, use the info_slave to get information from identd, * instead of having the MUSH do it directly. This may help reduce lag * from new logins. This does _not_ work under Win32. --- 83,88 ---- *************** *** 111,148 **** /*------------------------- MUSH Features ----------------------*/ - /* This option is to control whether functions may have side effects - * affecting the db. With it on, the functions create(), open(), - * dig(), link(), and set() exist, corresponding to the @commands of - * the same name. Also, the 2 parameter versions of zone(), parent(), - * and lock() are enabled by this define. - */ - #define FUNCTION_SIDE_EFFECTS /* */ - - /* Comment this out if you don't wish to use the built-in mail system. - * The @mail command provides a flexible hardcoded mail system, which - * uses its own database to store messages. - */ - #define USE_MAILER /* */ - - /* Defining ALLOW_NOSUBJECT marks mail sent with no subject as having - * subject '(no subject)'. The default is for the subject of the mail to - * be the first 30 characters of the message when not specfied - */ - /* #define ALLOW_NOSUBJECT /* */ - - /* - * Should we have mail aliases (@mailing lists?). This modifies - * the maildb format, but you can reverse it. - */ - #define MAIL_ALIASES /* */ - - /* The chat channels system allows players to talk cross-MUSH to each - * other, without needing to be in the same room. Whether or not you - * want this depends on what type of MUSH you want. - */ - #define CHAT_SYSTEM /* */ - /* Many MUSHes want to change the +channels to =channels. That's * annoying. So we've got this CHAT_TOKEN_ALIAS, which allows + as well * as = (or whatever) channels. If you want this, define it to be --- 97,102 ---- *************** *** 151,200 **** */ /* #define CHAT_TOKEN_ALIAS '=' /* */ - /* Quotas limit players to a fixed number of objects. - * Wizards can check and set quotas on players. - * See also restricted_building in game/mush.cnf for another way - * to slow database growth. - */ - /* #define QUOTA /* */ - - - /*---------------------------