*** look.c.old Sat Oct 6 19:04:57 1990 --- look.c Mon Nov 19 13:52:55 1990 *************** *** 117,123 **** for (; *p && !isspace(*p); p++) ; if (*p) p++; ! if ((Typeof(i) != TYPE_PROGRAM) || DBFETCH(player)->sp.player.run) { if (*p) notify (player, p); else notify(player, "You see nothing special."); } else { --- 117,124 ---- for (; *p && !isspace(*p); p++) ; if (*p) p++; ! if (i < 0 || i >= db_top ! || (Typeof(i) != TYPE_PROGRAM) || DBFETCH(player)->sp.player.run) { if (*p) notify (player, p); else notify(player, "You see nothing special."); } else { *** interp.c.old Fri Apr 5 20:11:14 1991 --- interp.c Fri Apr 5 19:49:30 1991 *************** *** 135,140 **** --- 135,141 ---- fr = DBFETCH(player)->sp.player.run = (struct frame *) calloc(1, sizeof(struct frame)); if (!can_link_to(OWNER(source), TYPE_EXIT, program)) { + free((void *) fr); notify(player, "Program call: Permission denied."); return 0; } *************** *** 289,295 **** abort_loop("Program word: Stack Underflow."); temp1 = arg + --atop; if (temp1->type != PROG_ADD) ! abort_loop("Program word: Program internal error."); if (stop >= STACK_SIZE) abort_loop("Program word: Stack Overflow"); sys[stop++].data.call = pc + 1; --- 290,296 ---- abort_loop("Program word: Stack Underflow."); temp1 = arg + --atop; if (temp1->type != PROG_ADD) ! abort_loop("JMP: Non-address argument."); if (stop >= STACK_SIZE) abort_loop("Program word: Stack Overflow"); sys[stop++].data.call = pc + 1; *************** *** 767,773 **** case IN_BANG: CHECKOP(2); oper1 = POP(); oper2 = POP(); ! if (oper1->type != PROG_VAR || oper1->data.number >= MAX_VAR) abort_interp("Non-variable argument (2)"); CLEAR(&fr -> variables[oper1->data.number]); copyinst(oper2, &(fr -> variables[oper1->data.number])); --- 768,775 ---- case IN_BANG: CHECKOP(2); oper1 = POP(); oper2 = POP(); ! if (oper1->type != PROG_VAR ! || (oper1->data.number >= MAX_VAR) || (oper1->data.number < 0)) abort_interp("Non-variable argument (2)"); CLEAR(&fr -> variables[oper1->data.number]); copyinst(oper2, &(fr -> variables[oper1->data.number])); *** wiz.c.old Fri Apr 5 20:19:55 1991 --- wiz.c Fri Apr 5 21:11:06 1991 *************** *** 350,355 **** --- 350,357 ---- if(Typeof(victim) != TYPE_PLAYER) { notify(player, "You can only boot players!"); + } else if (victim == player) { + notify(player, "You cannot boot yourself."); } #ifdef GOD_PRIV else if(God(victim)) { *************** *** 377,401 **** } else if(Wizard(victim)) { notify(player, "You can't turn a Wizard into an toad!"); } else { ! /* we're ok */ ! /* do it */ ! send_contents(player, HOME); for (stuff = 0; stuff < db_top; stuff++) { if (OWNER(stuff) == victim) { ! switch (Typeof(stuff)) { ! case TYPE_ROOM: ! case TYPE_THING: ! case TYPE_EXIT: ! case TYPE_PROGRAM: ! OWNER(stuff) = recipient; ! DBDIRTY(stuff); ! break; ! } } } if(DBFETCH(victim)->sp.player.password) { free((void *) DBFETCH(victim)->sp.player.password); ! DBFETCH(victim)->sp.player.password = 0; } FLAGS(victim) = TYPE_THING; OWNER(victim) = player; /* you get it */ --- 377,403 ---- } else if(Wizard(victim)) { notify(player, "You can't turn a Wizard into an toad!"); } else { ! /* chown things to recipient, checking for a sane home location */ ! /* for object. XXX -- if HOME/inventory handling changes, */ ! /* please check this code.*/ ! for (stuff = 0; stuff < db_top; stuff++) { + if ((Typeof(stuff) == TYPE_THING) + && (DBFETCH(stuff)->sp.thing.home == victim)) { + DBSTORE(stuff, sp.thing.home, PLAYER_START); + } if (OWNER(stuff) == victim) { ! OWNER(stuff) = recipient; ! DBDIRTY(stuff); } } + /* Take them home; things should no longer be homed here, programs */ + /* should not be owned by player */ + + send_contents(victim, HOME); if(DBFETCH(victim)->sp.player.password) { free((void *) DBFETCH(victim)->sp.player.password); ! DBFETCH(victim)->sp.player.password = NULL; } FLAGS(victim) = TYPE_THING; OWNER(victim) = player; /* you get it */ *** property.c.old Fri Sep 28 12:32:00 1990 --- property.c Wed Apr 17 15:56:39 1991 *************** *** 27,32 **** --- 27,34 ---- #include "db.h" #include "externs.h" + #include "params.h" + #ifdef COMPRESS extern const char *compress(const char *); #define alloc_compressed(x) alloc_string(compress(x)) *************** *** 47,52 **** --- 49,55 ---- { struct plist *p, *l; + if (!type || !*type || index(type, PROP_DELIMITER)) return; if (DBFETCH(player)->properties) { /* stick properties at the end because most frequently used ones *** interface.c~ Thu Apr 25 11:11:07 1991 --- interface.c Sun Apr 28 16:44:40 1991 *************** *** 983,989 **** #else /* !HOSTNAMES */ strcpy(pbuf, unparse_object(e->player, d->player)); #endif /* HOSTNAMES */ ! sprintf(buf,"%-*s [%6d] %10s %4s %s\r\n", PLAYER_NAME_LIMIT + #ifdef HOSTNAMES /* Ack! */ 9 --- 983,989 ---- #else /* !HOSTNAMES */ strcpy(pbuf, unparse_object(e->player, d->player)); #endif /* HOSTNAMES */ ! sprintf(buf,"%-*s [%6d] %10s %4s %-.26s\r\n", PLAYER_NAME_LIMIT + #ifdef HOSTNAMES /* Ack! */ 9