PennMUSH Community

Changeset 403

Show
Ignore:
Timestamp:
08/12/06 06:06:58 (2 years ago)
Author:
pennmush
Message:

PennMUSH 1.7.7p2 Archival

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.7.7/CHANGES

    r401 r403  
    1818 
    1919========================================================================== 
     20 
     21Version 1.7.7 patchlevel 2                      December 22, 2002 
     22 
     23Major Changes: 
     24  * The LOCAL_DATA define has been removed along with the pointer 
     25    in the object structure. The local functions called on creation, 
     26    destruction, and cloning are now always called. Objects can 
     27    now store data in a single hashtable using the set_objdata() 
     28    and get_objdata() functions. As a proof of concept, the transitory 
     29    channel lists on objects are now stored here, and the "channels" 
     30    pointer has been removed from the object structure. Design 
     31    and much of the implementation by Vadiv@M*U*S*H. 
     32Powers: 
     33  * can_nspemit power can be used to provide access to @nspemit 
     34    without a Wizard bit. [SW] 
     35Functions: 
     36  * lpos from Mux, TM3. [SW] 
     37Fixes: 
     38  * Fix to some gcc-specific macros reported by Peter Bengston and 
     39    Michael Holbrook. [SW] 
     40  * Improvements to stripaccents/noaccents conversions. [SW] 
     41  * Fixes from 1.7.6p3. 
     42 
    2043 
    2144Version 1.7.7 patchlevel 1                      December 17, 2002 
  • 1.7.7/INSTALL

    r399 r403  
    121121    ./Configure -d 
    122122 
    123    On cygwin systems
     123   On cygwin systems, try ./Configure -d, but if it fails, try
    124124    . Configure 
    125125     (That's a single period, a space, and Configure) 
  • 1.7.7/Patchlevel

    r401 r403  
    11Do not edit this file. It is maintained by the official PennMUSH patches. 
    2 This is PennMUSH 1.7.7p1 
     2This is PennMUSH 1.7.7p2 
  • 1.7.7/game/mushcnf.dst

    r401 r403  
    163163# which could be useful if your host limits your stack (it will prevent 
    164164# a crash). The higher your allowed stack size limit, the larger the 
    165 # mush process can grow, and the higher this can be set. 
    166 # But remember that you need to recurse for every [ or { or function call 
    167 # in your code, and those add up quickly. So this must often be set quit
    168 # high (e.g. 18000), alas. Setting it to '0' means unlimited. 
    169 call_limit 10000 
     165# mush process can grow, and the higher this can be set. Generally 
     166# speaking, you won't ever see more than 8192 recursions, so that's 
     167# probably an upper limit, but most sane code shouldn't need mor
     168# than a couple thousand. Setting it to '0' means unlimited. 
     169call_limit 5000 
    170170 
    171171# The maximum number of milliseconds of CPU time that a single queue entry 
  • 1.7.7/game/txt/hlp/pennflag.hlp

    r399 r403  
    419419  $-commands; thus, any object which does not have $-commands on it should 
    420420  be set NO_COMMAND. Many MUSHes choose to have all objects initially set 
    421   NO_COMMAND at creation. 
     421  NO_COMMAND at creation. The flag has no effect on exits. 
    422422 
    423423  See also: USER-DEFINED COMMANDS 
  • 1.7.7/game/txt/hlp/pennfunc.hlp

    r401 r403  
    4646  Communication functions: Send messages to objects (PEMIT, OEMIT) 
    4747  Dbref functions: return dbref info related to objects (LOC, LEXITS) 
    48   Floating point functions: floating point math (SIN, ROUND) 
    4948  Global functions: local MUSH-specific functions defined with @function 
     49  Html functions: output html tags for Pueblo-compatible clients 
    5050  Information functions:  find out something about objects (FLAGS, MONEY) 
    5151  List functions:  manipulate lists (REVWORDS, FIRST) 
     
    109109  on an object. 
    110110   
    111   con()         entrances()   followers()   following()   home()         
    112   lcon()        lexits()      loc()         locate()      lparent()      
    113   lsearch()     next()        num()         owner()       parent()       
     111  con()         entrances()   exit()        followers()   following()    
     112  home()        lcon()        lexits()      loc()         locate()       
     113  lparent()     lplayers()    lsearch()     lvcon()       lvexits()      
     114  lvplayers()   next()        num()         owner()       parent()       
    114115  pmatch()      rloc()        rnum()        room()        where()        
    115116  zone() 
     
    135136  mailstats()   mailstatus()  mailsubject() mailtime() 
    136137   
    137 & Floating point functions 
    138   Floating point functions operate on floating point numbers. Most of 
    139   them return a floating-point number as a result. Floating point 
    140   results can have at most 6 decimal places of precision. 
    141   
    142   These functions only exist if floating point computation is enabled. 
    143   Check "@config" to see if they are. 
    144   
    145   acos()        asin()        atan()        ceil()        cos() 
    146   e()           exp()         fdiv()        floor()       log() 
    147   ln()          pi()          power()       round()       sin() 
    148   sqrt()        tan() 
    149   
    150138& List functions 
    151139  List functions take at least one list of elements and return transformed 
     
    160148  replace()     rest()        revwords()    setdiff()     setinter() 
    161149  setunion()    shuffle()     sort()        sortby()      splice() 
    162   wordpos()     words() 
     150  step()        table()       wordpos()     words() 
    163151     
    164152  See also: LISTS 
     
    178166  These functions operate only with floating point numbers: 
    179167  acos()        asin()        atan()        atan2()       ceil() 
    180   cos()         e()           exp()         fdiv()        floor() 
    181   fmod()        ln()          log()         pi()          power() 
    182   round()       sin()         sqrt()        tan() 
     168  cos()         ctu()         e()           exp()         fdiv()         
     169  floor()       fmod()        ln()          log()         pi()           
     170  power()       round()       sin()         sqrt()        tan() 
    183171 
    184172  These functions operate on n-dimensional vectors. A vector 
     
    205193  ifelse()      lcstr()       left()        lit()         ljust() 
    206194  merge()       mid()         ord()         pos()         regedit() 
    207   regmatch()    repeat()      reverse()     right()       rjust() 
    208   scramble()    secure()      sha1()        space()       spellnum()     
    209   squish()      strcat()      strinsert()   stripaccent() stripansi()    
    210   strlen()      strmatch()    switch()      trim()        ucstr()        
    211   wrap() 
     195  lpos()        regmatch()    repeat()      reverse()     right() 
     196  rjust()       scramble()    secure()      sha1()        space() 
     197  spellnum()    squish()      strcat()      strinsert()   stripaccents() 
     198  stripansi()   strlen()      strmatch()    switch()      trim() 
     199  ucstr()       wrap() 
    212200  
    213201  See also: STRINGS 
     
    16711659  regardless of whether or not you have objects in it. 
    16721660 
    1673   See also: lexits(), con(), next() 
     1661  See also: lexits(), lplayers(), con(), next(), lvcon() 
    16741662& LCSTR() 
    16751663  lcstr(<string>) 
     
    18961884 
    18971885  See also: lvplayers(), lcon() 
     1886& LPOS() 
     1887  lpos(<string>, <character>) 
     1888 
     1889  This function returns a list of the positions where <character> occupies 
     1890  in <string>, with te first character of the string being 0. Note that 
     1891  this differs from the pos() function, but is consistent with other string 
     1892  functions like mid() and delete(). 
     1893 
     1894  If <character> is a null argument, space is used. 
     1895  If <character> is not found anywhere in <string>, an empty list is  
     1896  returned. 
     1897 
     1898  Example: 
     1899  > say lpos(a-bc-def-g, -) 
     1900  You say, "1 4 8" 
     1901 
     1902  See also: pos() 
    18981903& LSEARCH() 
    18991904& SEARCH() 
     
    22962301  acts just like @name <object>=<new name>. Consequently, if renaming 
    22972302  a player, you must use the player's password or be God. 
     2303 
     2304  name() with no arguments currently returns nothing. This should be an 
     2305  error, but enough old code has been written that expects this behavior 
     2306  that it will continue to do this for the time being. Don't rely on it. 
    22982307 
    22992308  Related functions: FULLNAME(), INAME()  
     
    32383247  See also: @tel 
    32393248& TEXTFILE() 
     3249& dynhelp() 
    32403250  textfile(<type>,<entry>) 
    32413251 
  • 1.7.7/game/txt/hlp/penntop.hlp

    r399 r403  
    966966  tport_anywhere        Can @teleport to anywhere. 
    967967  unkillable            Can not be killed 
     968  can_nspemit           Can use @nspemit and nspemit() 
    968969 
    969970  See also: @power 
  • 1.7.7/game/txt/hlp/pennvers.hlp

    r401 r403  
    11& changes 
    2 & 1.7.7p1 
     2& 1.7.7p2 
    33This is a list of changes in this patchlevel which are probably of 
    44interest to players. More information about new commands and functions 
     
    1212be read in 'help patchlevels'. 
    1313 
     14Version 1.7.7 patchlevel 2                      December 22, 2002 
     15 
     16Major Changes: 
     17  * The LOCAL_DATA define has been removed along with the pointer 
     18    in the object structure. The local functions called on creation, 
     19    destruction, and cloning are now always called. Objects can 
     20    now store data in a single hashtable using the set_objdata() 
     21    and get_objdata() functions. As a proof of concept, the transitory 
     22    channel lists on objects are now stored here, and the "channels" 
     23    pointer has been removed from the object structure. Design 
     24    and much of the implementation by Vadiv@M*U*S*H. 
     25Powers: 
     26  * can_nspemit power can be used to provide access to @nspemit 
     27    without a Wizard bit. [SW] 
     28Functions: 
     29  * lpos from Mux, TM3. [SW] 
     30Fixes: 
     31  * Fix to some gcc-specific macros reported by Peter Bengston and 
     32    Michael Holbrook. [SW] 
     33  * Improvements to stripaccents/noaccents conversions. [SW] 
     34  * Fixes from 1.7.6p3. 
     35 
     36 
     37& 1.7.7p1 
    1438Version 1.7.7 patchlevel 1                      December 17, 2002 
    1539 
     
    547571  * Indentation fixes [SW] 
    548572  * Fixes up to 1.7.4p12 merged in. 
     573 
     574& 1.7.6p3 
     575Version 1.7.6 patchlevel 3                      December 22, 2002 
     576 
     577Minor changes: 
     578   * call_limit now controls the maximum recursion in process_expression, 
     579     instead of maximum calls to p_e per command cycle. This still 
     580     limits stack size, but doesn't get in the way of massive code 
     581     nearly as much. People using a very high call_limit value should 
     582     probably lower it significantly. Patch by Philip Mak. 
     583   * Improved error messages for many database information functions. 
     584     Notably, several functions that require at least one argument, 
     585     now complain if they don't get it rather than returning silently. 
     586     Suggested by Intrevis@M*U*S*H. [SW] 
     587Fixes: 
     588   * @warnings are no longer shown on GOING objects. Suggested by 
     589     Philip Mak. 
     590   * Help fixes by Intrevis, Time, and Ambrosia@M*U*S*H 
     591   * Bug in @decomp/skipdefaults reported by Philip Mak. [SW] 
     592   * Tweaks to utils/mkcmds.sh [SW] 
     593   * home() on a room acts as described in the help. Reported by 
     594     Intrevis@M*U*S*H. [SW] 
     595   * whisper/noisy double-notified the whisperer. Reported by Philip Mak. 
     596   * Crash bug in @mail fixed. Reported by Titan@OtherSpace. 
     597 
    549598 
    550599& 1.7.6p2 
     
    58265875type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 
    58275876 
    5828 1.7.7: 0, 1 
    5829 1.7.6: 0, 1, 2 
     58771.7.7: 0, 1, 2 
     58781.7.6: 0, 1, 2, 3 
    583058791.7.5: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 
    583158801.7.4: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
  • 1.7.7/hdrs/conf.h

    r399 r403  
    351351/* Compiler-specific stuff. */ 
    352352 
     353#ifndef __GNUC_PREREQ 
     354#if defined __GNUC__ && defined __GNUC_MINOR__ 
     355# define __GNUC_PREREQ(maj, min) \ 
     356        ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) 
     357#else 
     358# define __GNUC_PREREQ(maj, min) 0 
     359#endif 
     360#endif 
     361 
    353362/* For gcc 3 and up, this attribute lets the compiler know that the 
    354363 * function returns a newly allocated value, for pointer aliasing 
    355364 * optimizations. 
    356365 */ 
    357 #ifndef __attribute_malloc__ 
    358 #if defined(__GNUC__) && __GNUC__ >= 3 
     366#if !defined(__attribute_malloc__) && __GNUC_PREREQ(2, 96) 
    359367#define __attribute_malloc__ __attribute__ ((__malloc__)) 
    360 #else 
     368#elif !defined(__attribute_malloc__) 
    361369#define __attribute_malloc__ 
    362 #endif 
    363370#endif 
    364371 
     
    369376 * This should be a Configure check sometime. 
    370377 */ 
    371 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 
     378#if __GNUC_PREREQ(2, 92) 
     379#define RESTRICT __restrict 
     380#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 
    372381#define RESTRICT restrict 
    373 #elif defined(__GNUC__) 
    374 #define RESTRICT __restrict__ 
    375382#else 
    376383#define RESTRICT 
     
    381388#if defined(WIN32) && _MSC_VER >= 1200 
    382389#define NORETURN __declspec(noreturn) 
    383 #elif defined(HAS_ATTRIBUTE) 
     390#elif defined(HASATTRIBUTE) 
    384391#define NORETURN __attribute__ ((__noreturn__)) 
    385392#else 
  • 1.7.7/hdrs/dbdefs.h

    r399 r403  
    99#endif 
    1010#include <time.h> 
     11#include "htab.h" 
    1112 
    1213extern int depth; 
     
    6263 
    6364#define AttrCount(x)    (db[(x)].attrcount) 
    64  
    65 #ifdef LOCAL_DATA 
    66 #define LocData(x)      (db[(x)].local_data) 
    67 #endif 
    6865 
    6966/* Moved from warnings.c because create.c needs it. */ 
     
    234231  dbref zone;           /* zone master object number */ 
    235232  int penn;         /* number of pennies object contains */ 
    236 #ifdef CHAT_SYSTEM 
    237   CHANLIST *channels; 
    238 #endif 
    239233  int warnings;         /* bitflags of warning types */ 
    240234  time_t creation_time;     /* Time/date of object creation */ 
     
    243237                 * logins for players. */ 
    244238  int attrcount;        /* Number of attribs on the object */ 
    245 #ifdef LOCAL_DATA 
    246   void *local_data; 
    247 #endif 
    248239  object_flag_type flags; 
    249240  object_flag_type toggles; 
     
    263254extern struct object *db; 
    264255extern dbref db_top; 
     256 
     257extern void *get_objdata(dbref thing, const char *keybase); 
     258extern void *set_objdata(dbref thing, const char *keybase, void *data); 
     259extern void clear_objdata(dbref thing); 
    265260 
    266261#define DOLIST(var, first)\ 
  • 1.7.7/hdrs/extchat.h

    r399 r403  
    9292}; 
    9393 
    94 #define Chanlist(x) db[(x)].channels 
     94#define Chanlist(x) get_objdata(x, "CHANNELS") 
     95#define s_Chanlist(x, y) set_objdata(x, "CHANNELS", y) 
    9596 
    9697/* Channel type flags and macros */ 
  • 1.7.7/hdrs/externs.h

    r401 r403  
    368368 
    369369    typedef struct { 
    370       unsigned char base; 
     370      const char *base; 
    371371      const char *entity; 
    372372    } accent_info; 
     
    474474    void local_connect(dbref player, int isnew, int num); 
    475475    void local_disconnect(dbref player, int num); 
    476 #ifdef LOCAL_DATA 
    477476    void local_data_create(dbref object); 
    478477    void local_data_clone(dbref clone, dbref source); 
    479478    void local_data_free(dbref object); 
    480 #endif 
    481479 
    482480/* funlist.c */ 
  • 1.7.7/hdrs/flags.h

    r399 r403  
    272272#define LINK_ANYWHERE   0x20000000  /* Can @link an exit to any room */ 
    273273#define OPEN_ANYWHERE   0x40000000  /* Can @open an exit from any room */ 
     274#define CAN_NSPEMIT     0x80000000  /* Can use @nspemit and nspemit() */ 
    274275 
    275276/* These powers are obsolete, but are kept around to implement 
  • 1.7.7/hdrs/version.h

    r401 r403  
    1 #define VERSION "PennMUSH version 1.7.7 patchlevel 1 [12/17/2002]" 
    2 #define SHORTVN "PennMUSH 1.7.7p1
     1#define VERSION "PennMUSH version 1.7.7 patchlevel 2 [12/22/2002]" 
     2#define SHORTVN "PennMUSH 1.7.7p2
  • 1.7.7/options.h.dist

    r399 r403  
    118118/* #define MEM_CHECK /* */ 
    119119 
    120 /* Defining this will add 4 bytes to every object in memory, and that is 
    121  * the local_data void *pointer. 
    122  * Usefull for local hackers, who can store stuff like skills, languages, 
    123  * combat stats etc in a record this points to, and then store/reload it 
    124  * in the local_* hooks. 
    125  * If you are NOT one of those who modify the local C source extensivly, 
    126  * this will be COMPLETELY worthless to you. 
    127  */ 
    128 /* #define LOCAL_DATA /* */ 
    129  
    130120/* If defined, use the info_slave to get information from identd, 
    131121 * instead of having the MUSH do it directly.  This may help reduce lag 
  • 1.7.7/src/bsd.c

    r401 r403  
    352352void add_to_queue(struct text_queue *q, const char *b, int n); 
    353353int flush_queue(struct text_queue *q, int n); 
    354 int queue_write(DESC *d, const char *b, int n); 
    355 int queue_newwrite(DESC *d, const char *b, int n); 
    356 int queue_new_eol(DESC *d); 
    357 int queue_string(DESC *d, const char *s); 
     354static int queue_write(DESC *d, const char *b, int n); 
     355static int queue_newwrite(DESC *d, const unsigned char *b, int n); 
     356static int queue_string(DESC *d, const char *s); 
    358357static int queue_string_eol(DESC *d, const char *s); 
    359358int process_output(DESC *d); 
     
    10641063      safe_str("\xFF\xFF", t, &o); 
    10651064    else if (strip) 
    1066       safe_chr((char) accent_table[IAC].base, t, &o); 
     1065      safe_str(accent_table[IAC].base, t, &o); 
    10671066    else 
    10681067      safe_chr((char) IAC, t, &o); 
     
    10821081    break; 
    10831082      default: 
    1084     if (strip
    1085       safe_chr((char) accent_table[(unsigned char) *p].base, t, &o); 
     1083    if (strip && accent_table[(unsigned char) *p].base
     1084      safe_str(accent_table[(unsigned char) *p].base, t, &o); 
    10861085    else 
    10871086      safe_chr(*p, t, &o); 
     
    12051204          break; 
    12061205        default: 
    1207           safe_chr((char) accent_table[(unsigned char) *p].base, t, &o); 
     1206          if (accent_table[(unsigned char) *p].base) 
     1207        safe_str(accent_table[(unsigned char) *p].base, t, &o); 
     1208          else 
     1209        safe_chr(*p, t, &o); 
    12081210          break; 
    12091211        } 
     
    12421244    if (type == NA_TANSI || type == NA_TCOLOR) 
    12431245      safe_str("\xFF\xFF", t, &o); 
    1244     else if (strip
    1245       safe_chr(accent_table[IAC].base, t, &o); 
     1246    else if (strip && accent_table[IAC].base
     1247      safe_str(accent_table[IAC].base, t, &o); 
    12461248    else 
    12471249      safe_chr((char) IAC, t, &o); 
     
    12701272      ansi_change_state(t, &o, color, state, newstate); 
    12711273    } 
    1272     if (strip
    1273       safe_chr((char) accent_table[(unsigned char) *p].base, t, &o); 
     1274    if (strip && accent_table[(unsigned char) *p].base
     1275      safe_str(accent_table[(unsigned char) *p].base, t, &o); 
    12741276    else 
    12751277      safe_chr(*p, t, &o); 
     
    30723074} 
    30733075 
    3074 int 
     3076static int 
    30753077queue_write(DESC *d, const char *b, int n) 
    30763078{ 
     
    31113113} 
    31123114 
    3113 int 
    3114 queue_newwrite(DESC *d, const char *b, int n) 
     3115static int 
     3116queue_newwrite(DESC *d, const unsigned char *b, int n) 
    31153117{ 
    31163118  int space; 
     
    32203222} 
    32213223 
    3222 int 
     3224static int 
    32233225queue_string(DESC *d, const char *s) 
    32243226{ 
  • 1.7.7/src/command.c

    r399 r403  
    192192  {"@NOTIFY", "ALL ANY", cmd_notify_drain, CMD_T_ANY | CMD_T_EQSPLIT, 0, 0, 0}, 
    193193  {"@NSPEMIT", "LIST SILENT NOISY NOEVAL", cmd_nspemit, 
    194    CMD_T_ANY | CMD_T_EQSPLIT, WIZARD, 0, 0}, 
     194   CMD_T_ANY | CMD_T_EQSPLIT, WIZARD, 0, CAN_NSPEMIT}, 
    195195  {"@NUKE", NULL, cmd_nuke, CMD_T_ANY | CMD_T_NOGAGGED, 0, 0, 0}, 
    196196 
  • 1.7.7/src/create.c

    r399 r403  
    141141    } 
    142142    current_state.exits++; 
    143 #ifdef LOCAL_DATA 
    144143    local_data_create(new_exit); 
    145 #endif 
    146144    return new_exit; 
    147145  } 
     
    359357    } 
    360358    current_state.rooms++; 
    361 #ifdef LOCAL_DATA 
    362359    local_data_create(room); 
    363 #endif 
    364360    if (tport) { 
    365361      /* We need to use the full command, because we need NO_TEL 
     
    424420    notify_format(player, "Created: Object %s.", unparse_dbref(thing)); 
    425421    current_state.things++; 
    426 #ifdef LOCAL_DATA 
    427422    local_data_create(thing); 
    428 #endif 
    429423    return thing; 
    430424  } 
     
    442436  memcpy(REFDB(clone), REFDB(thing), sizeof(struct object)); 
    443437  Owner(clone) = Owner(player); 
    444 #ifdef CHAT_SYSTEM 
    445   Chanlist(clone) = NULL; 
    446 #endif 
    447438  Name(clone) = NULL; 
    448439  if (newname && *newname) 
     
    519510    moveto(clone, Location(player)); 
    520511      current_state.things++; 
    521 #ifdef LOCAL_DATA 
    522       LocData(clone) = NULL; 
    523512      local_data_clone(clone, thing); 
    524 #endif 
    525513      real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, 
    526514          wenv); 
     
    535523      notify_format(player, T("Cloned: Room #%d."), clone); 
    536524      current_state.rooms++; 
    537 #ifdef LOCAL_DATA 
    538       LocData(clone) = NULL; 
    539525      local_data_clone(clone, thing); 
    540 #endif 
    541526      real_did_it(player, clone, NULL, NULL, NULL, NULL, "ACLONE", NOTHING, 
    542527          wenv); 
     
    589574           ("Warning: @CLONE/PRESERVE on an exit with WIZ, ROY, @Powers, or Warnings.")); 
    590575      notify_format(player, T("Cloned: Exit #%d."), clone); 
    591 #ifdef LOCAL_DATA 
    592       LocData(clone) = NULL; 
    593576      local_data_clone(clone, thing); 
    594 #endif 
    595577      return clone; 
    596578    } 
  • 1.7.7/src/db.c

    r399 r403  
    2929#include "strtree.h" 
    3030#include "parse.h" 
     31#include "htab.h" 
    3132#include "confmagic.h" 
    3233 
     
    5960 
    6061dbref db_size = DB_INITIAL_SIZE; 
     62 
     63HASHTAB htab_objdata; 
     64HASHTAB htab_objdata_keys; 
    6165 
    6266extern char ccom[]; 
     
    7579int get_list(FILE * f, dbref i); 
    7680void db_free(void); 
     81static void init_objdata_htab(int size); 
    7782 
    7883StrTree object_names; 
     
    157162      o->toggles = 0; 
    158163      o->powers = 0; 
    159 #ifdef CHAT_SYSTEM 
    160       /* initialize channels here, since it's not going to get done otherwise */ 
    161       o->channels = NULL; 
    162 #endif 
    163164      o->warnings = 0; 
    164165      o->modification_time = o->creation_time = mudtime; 
    165 #ifdef LOCAL_DATA 
    166       o->local_data = NULL; 
    167 #endif 
    168166      o->attrcount = 0; 
    169167      initialized++; 
     
    199197  o->toggles = 0; 
    200198  o->powers = 0; 
    201 #ifdef CHAT_SYSTEM 
    202   /* initialize channels here, since it's not going to get done otherwise */ 
    203   o->channels = NULL; 
    204 #endif 
    205199  o->warnings = 0; 
    206200  o->modification_time = o->creation_time = mudtime; 
    207 #ifdef LOCAL_DATA 
    208   o->local_data = NULL; 
    209 #endif 
    210201  o->attrcount = 0; 
    211202  if (current_state.garbage) 
     
    11931184    case '~': 
    11941185      db_init = (getref(f) * 3) / 2; 
     1186      init_objdata_htab(db_init); 
    11951187      break; 
    11961188      /* Use the MUSH 2.0 header stuff to see what's in this db */ 
     
    13131305      else 
    13141306    temp = 0; 
    1315 #ifdef CHAT_SYSTEM 
    1316       o->channels = NULL; 
    1317 #endif              /* CHAT_SYSTEM */ 
    13181307 
    13191308      /* If there are warnings in the db, read 'em in */ 
     
    13471336    Toggles(i) &= ~PLAYER_CONNECT; 
    13481337      } 
    1349 #ifdef LOCAL_DATA 
    1350       o->local_data = NULL; 
    1351 #endif 
    13521338      break; 
    13531339 
     
    13741360  } 
    13751361} 
     1362 
     1363static void 
     1364init_objdata_htab(int size) 
     1365{ 
     1366  hashinit(&htab_objdata, size, 4); 
     1367  hashinit(&htab_objdata_keys, 8, 32); 
     1368} 
     1369 
     1370void * 
     1371set_objdata(dbref thing, const char *keybase, void *data) 
     1372{ 
     1373  if (data) { 
     1374    if (hashadd(tprintf("%s_#%d", keybase, thing), data, &htab_objdata) < 0) 
     1375      return NULL; 
     1376    if (hash_find(&htab_objdata_keys, keybase) == NULL) { 
     1377      char *newkey = strdup(keybase); 
     1378      hashadd(keybase, (void *) &newkey, &htab_objdata_keys); 
     1379    } 
     1380    return data; 
     1381  } else { 
     1382    hashdelete(tprintf("%s_#%d", keybase, thing), &htab_objdata); 
     1383    return NULL; 
     1384  } 
     1385} 
     1386 
     1387void * 
     1388get_objdata(dbref thing, const char *keybase) 
     1389{ 
     1390  return hashfind(tprintf("%s_#%d", keybase, thing), &htab_objdata); 
     1391} 
     1392 
     1393void 
     1394clear_objdata(dbref thing) 
     1395{ 
     1396  char *p; 
     1397  /* Clear all data stored for this object. Used when the object is freed */ 
     1398  for (p = (char *) hash_firstentry(&htab_objdata_keys); 
     1399       p; p = (char *) hash_nextentry(&htab_objdata_keys)) { 
     1400    set_objdata(thing, p, NULL); 
     1401  } 
     1402} 
  • 1.7.7/src/destroy.c

    r399 r403  
    577577  if (!GoodObject(thing)) 
    578578    return; 
    579 #ifdef LOCAL_DATA 
    580579  local_data_free(thing); 
    581 #endif 
    582580  switch (Typeof(thing)) { 
    583581  case TYPE_THING: 
     
    714712  Exits(thing) = NOTHING; 
    715713  Home(thing) = NOTHING; 
     714 
     715  clear_objdata(thing); 
    716716 
    717717  Next(thing) = first_free; 
  • 1.7.7/src/extchat.c

    r399 r403  
    401401  /* No channels? */ 
    402402  if (!Chanlist(who)) { 
    403     Chanlist(who) = tmp
    404     Chanlist(who)->next = NULL
     403    tmp->next = NULL
     404    s_Chanlist(who, tmp)
    405405    return; 
    406406  } 
     
    408408  /* First channel? */ 
    409409  if (strcasecoll(ChanName(p->chan), ChanName(*ch)) > 0) { 
    410     Chanlist(who) = tmp; 
    411     Chanlist(who)->next = p
     410    tmp->next = p; 
     411    s_Chanlist(who, tmp)
    412412    return; 
    413413  } else if (!strcasecmp(ChanName(p->chan), ChanName(*ch))) { 
     
    441441  if (!ch) 
    442442    return; 
    443   if (!Chanlist(who)) 
    444     return; 
    445443  p = Chanlist(who); 
     444  if (!p) 
     445    return; 
    446446  if (p->chan == ch) { 
    447447    /* First channel */ 
    448     Chanlist(who) = p->next
     448    s_Chanlist(who, p->next)
    449449    free_chanlist(p); 
    450450    return; 
     
    22872287} 
    22882288 
     2289 
    22892290#endif              /* CHAT_SYSTEM */ 
  • 1.7.7/src/extmail.c

    r399 r403  
    25352535  struct mail_alias *m; 
    25362536  int i; 
    2537   char keepsub[BUFFER_LEN]; 
    25382537 
    25392538  /* send a mail message to each player on an alias */ 
     
    25482547    return 0; 
    25492548 
    2550   strcpy(keepsub, uncompress(subject)); 
    2551  
    25522549  /* If they are not allowed to see the people on the alias, then 
    25532550   * we must treat this as a case of silent mailing. 
     
    25622559 
    25632560  for (i = 0; i < m->size; i++) { 
    2564     send_mail(player, m->members[i], keepsub, message, flags, silent, nosig); 
     2561    send_mail(player, m->members[i], subject, message, flags, silent, nosig); 
    25652562  } 
    25662563  return 1;         /* Success */ 
  • 1.7.7/src/flags.c

    r399 r403  
    187187  {"Tport_Anywhere", TEL_ANYWHERE}, 
    188188  {"Unkillable", UNKILLABLE}, 
     189  {"Can_nspemit", CAN_NSPEMIT}, 
    189190  {NULL, 0} 
    190191}; 
  • 1.7.7/src/function.c

    r401 r403  
    298298  {"LPARENT", fun_lparent, 1, 1, FN_REG}, 
    299299  {"LPLAYERS", fun_lplayers, 1, 1, FN_REG}, 
     300  {"LPOS", fun_lpos, 2, 2, FN_REG}, 
    300301  {"LSEARCH", fun_lsearch, 1, 5, FN_REG}, 
    301302  {"LSEARCHR", fun_lsearch, 1, 5, FN_REG}, 
     
    335336  {"MUNGE", fun_munge, 3, 5, FN_REG}, 
    336337  {"MWHO", fun_lwho, 0, 0, FN_REG}, 
    337   {"NAME", fun_name, 1, 2, FN_REG}, 
     338  {"NAME", fun_name, 0, 2, FN_REG}, 
    338339  {"NAND", fun_nand, 1, INT_MAX, FN_REG}, 
    339340  {"NATTR", fun_nattr, 1, 1, FN_REG}, 
  • 1.7.7/src/fundb.c

    r399 r403  
    116116 
    117117  thing = match_thing(executor, args[0]); 
    118   if (thing == NOTHING) { 
    119     safe_str(T(e_match), buff, bp); 
     118  if (!GoodObject(thing)) { 
     119    safe_str(T(e_notvis), buff, bp); 
    120120    return; 
    121121  } 
     
    135135  dbref thing; 
    136136  thing = match_thing(executor, args[0]); 
    137   if (thing == NOTHING) { 
    138     safe_str(T(e_match), buff, bp); 
     137  if (!GoodObject(thing)) { 
     138    safe_str(T(e_notvis), buff, bp); 
    139139    return; 
    140140  } 
     
    153153 
    154154  thing = match_thing(executor, args[0]); 
    155   if (thing == NOTHING) { 
     155  if (!GoodObject(thing)) { 
    156156    safe_str(T(e_notvis), buff, bp); 
    157157    return; 
     
    187187  *s++ = '\0'; 
    188188  thing = match_thing(executor, args[0]); 
    189   if (thing == NOTHING) { 
     189  if (!GoodObject(thing)) { 
    190190    safe_str(T(e_notvis), buff, bp); 
    191191    return; 
     
    203203 
    204204  thing = match_thing(executor, args[0]); 
    205   if (thing == NOTHING) { 
     205  if (!GoodObject(thing)) { 
    206206    safe_str(T(e_notvis), buff, bp); 
    207207    return; 
     
    253253 
    254254  thing = match_thing(executor, args[0]); 
    255   if (thing == NOTHING) { 
     255  if (!GoodObject(thing)) { 
    256256    safe_str(T(e_notvis), buff, bp); 
    257257    return; 
     
    295295  *s++ = '\0'; 
    296296  thing = match_thing(executor, args[0]); 
    297   if (thing == NOTHING) { 
     297  if (!GoodObject(thing)) { 
    298298    safe_str(T(e_notvis), buff, bp); 
    299299    return; 
     
    424424    *p++ = '\0'; 
    425425  thing = match_thing(executor, args[0]); 
    426   if (thing == NOTHING) { 
    427     safe_str("#-1", buff, bp); 
     426  if (!GoodObject(thing)) { 
     427    safe_str(T(e_notvis), buff, bp); 
    428428    return; 
    429429  } 
     
    441441  } 
    442442} 
     443 
     444#ifdef WIN32 
     445#pragma warning( disable : 4761)    /* Disable bogus conversion warning */ 
     446#endif 
     447/* ARGSUSED */ 
     448FUNCTION(fun_haspower) 
     449{ 
     450  dbref it; 
     451  object_flag_type pwr; 
     452 
     453  it = match_thing(executor, args[0]); 
     454  if (!GoodObject(it)) { 
     455    safe_str(T(e_notvis), buff, bp); 
     456    return; 
     457  } 
     458  if (HASPOWER_RESTRICTED) 
     459    if (!Can_Examine(executor, it)) { 
     460      notify(executor, 
     461         T("We could let you see that, but then we'd have to kill you.")); 
     462      safe_str("#-1", buff, bp); 
     463      return; 
     464    } 
     465  pwr = find_power(args[1]); 
     466  if (pwr == -1) 
     467    safe_str(T("#-1 NO SUCH POWER"), buff, bp); 
     468  else 
     469    safe_boolean(Powers(it) & pwr, buff, bp); 
     470} 
     471 
     472/* ARGSUSED */ 
     473FUNCTION(fun_powers) 
     474{ 
     475  dbref it; 
     476 
     477  it = match_thing(executor, args[0]); 
     478  if (!GoodObject(it)) { 
     479&