Index: circle/ChangeLog diff -u circle/ChangeLog:1.137 circle/ChangeLog:1.145 --- circle/ChangeLog:1.137 Sat Aug 28 11:02:07 1999 +++ circle/ChangeLog Sun Jan 23 13:24:32 2000 @@ -1,6 +1,7 @@ Release history: +Version 3.00 beta pl16 release: August 30, 1999 Version 3.00 beta pl15 release: March 16, 1999 Version 3.00 beta pl14 release: July 3, 1998 Version 3.00 beta pl13a release: June 4, 1998 @@ -2741,7 +2742,7 @@ -- gg - Rick Glover found some old CRIMEOK references in magic.c -******** Patchlevel 15 *************************************************** +******** Patchlevel 16 *************************************************** 3/17/99 @@ -2921,3 +2922,88 @@ 8/28/99 -- gg - act.item.c: Fixed 'junk 83467534657834 coins' bug. + +-- gg - Released patchlevel 16. + +******** Patchlevel 17 *************************************************** + +8/28/99 + +-- gg - constants.c, structs.h: Welcome to bpl17. + +-- gg - interpreter.c: Todd A. Laycock noted + that we don't actually use ACMD(do_rent) anywhere, nor do we + even have one. + +12/14/99 + +-- gg - act.wizard.c, spec_assign,c: Fix '< top_of_world' from + Andrey Fidrya + +-- gg - modify.c: string_add(): Del + noticed a missing \r\n if people overflowed max_str on + the first line. + +12/17/99 + +-- gg - comm.c: perform_act(): "Bob Castillo" + noticed that illegal act() codes crash the MUD. Oops. + Fortunately, it only occurs due to lib/misc/socials or + aedit (the social editor) as user input is escaped to prevent + any act() codes at all. + +-- gg - act.informative.c: look_at_char(): Mob names aren't + capitalized due to \r\n prepended. + db.c: is_empty(): Crashes on NOWHERE and prevented + success by immortals. + act.wizard.c: do_return(): When disconnecting someone + upon return, make sure to not trash our own connection. + act.wizard.c: do_dc(): Needed to fix a case when + disconnecting people not in the game. + All spotted by "Andrey Fidrya" + +12/31/1999 + +-- dk - ChangeLog dates are now Y2K compliant! And just in the nick of + time! Thanks to all the COBOL hackers that brushed off their + cobwebs and worked around the clock to fix it. + +01/01/2000 + +-- dk - Happy New Year and Ante-Millennium. + + +01/14/2000 + +-- dk - comm.c: Changed some 'int's to 'socket_t's. That's what it's + there for, so that's what we'll use it for. (Why didn't anyone + else notice this?! Bizarre.) + +1/20/2000 -- See, I told you. + +-- gg - house.c: Removed a lot of '< 0' == 'NOWHERE' assumptions. + +-- gg - comm.c: Having a $ as the last character on the line + could do bad things since bpl4. Found by Bob + Castillo . + +1/23/2000 + +-- gg - house.c: Removed a lot of '>= 0' != 'NOWHERE' assumptions. + Del noticed I missed those. + +-- gg - comm.c: process_input(): Fixed the fact we write too much + to memory in the input buffer. Found by Bob Castillo + since it's much more noticeable in an unsigned variable. + +-- gg - comm.c: echo_on(): We don't need NAOFFD or NAOCRD, they + cause us problems, and others don't use them either. + +-- gg - db.c: file_to_string_alloc(): 'using' is a keyword in C++. + +-- gg - Batch of Rick Glover reports: + act.comm.c: do_spec_comm(): Use switch instead of if..else. + db.c: count_alias_records(): Don't count empty aliases. + parse_object(): in_room=NOWHERE is superfluous. + interpreter.c: nanny(): CON_CLOSE is possible. + Index: circle/doc/README.CYGWIN diff -u circle/doc/README.CYGWIN:1.1 circle/doc/README.CYGWIN:1.3 --- circle/doc/README.CYGWIN:1.1 Fri Jun 11 11:06:08 1999 +++ circle/doc/README.CYGWIN Fri Jan 21 21:11:14 2000 @@ -32,14 +32,14 @@ 3) Download and uncompress the latest version of CircleMUD according to the instructions in the main README file. (The FTP site is ftp.circlemud.org, in the pub/CircleMUD directory). Make sure that if you have downloaded the - "zipped" version (circle30bpl15.zip, or example), that you use an unzip + "zipped" version (circle30bpl17.zip, or example), that you use an unzip program which can handle long file names to unzip it (like the Win32 version of Info-Zip's "unzip"). Otherwise, download ther "tarred, gzipped" version - (circle30bpl15.tar.gz), and extract the files using the versions of tar and + (circle30bpl17.tar.gz), and extract the files using the versions of tar and gunzip which come with the full Cygwin package. 4) Start the "bash" shell and go to the directory where you have extracted - CircleMUD (we will assume "C:\circle30bpl16", or "/circle30bpl16" from + CircleMUD (we will assume "C:\circle30bpl17", or "/circle30bpl17" from within bash). DO NOT go into the "src" directory yet. 5) Run the shell script "./configure". This will automatically detect @@ -51,9 +51,9 @@ an executable, you can also try "sh configure", "sh ./configure", "bash configure" and "bash ./configure" until one of them works. -6) NOW change to the /circle30bpl15/src directory, and type "make", and watch +6) NOW change to the /circle30bpl17/src directory, and type "make", and watch CircleMUD and the additional utilies included in the Circle distribution - automatically being compiled and placed in /circle30bpl15/bin. + automatically being compiled and placed in /circle30bpl17/bin. 7) Make sure your TCP/IP stack is installed, correctly configured, and running. If you are already using TCP/IP applications from your Windows machine such @@ -68,7 +68,7 @@ YOU MUST INSTALL AND CONFIGURE YOUR TCP/IP STACK, EVEN IF YOU ARE NOT CONNECTED TO THE INTERNET. -8) Go back to /circle30bpl15, and run the MUD either directly by typing +8) Go back to /circle30bpl17, and run the MUD either directly by typing "bin/circle", or by using the "./autorun" script. 9) Start a telnet program (SEE NOTE BELOW). Open a connection to your @@ -105,7 +105,7 @@ answered in this README file, or in other documents included in the CircleMUD distribution. If you are still having problems and you're *sure* that this your question is not answered in this document or in one of the others files -in the /circle30bpl15/doc directory, try reading the CircleMUD FAQ at +in the /circle30bpl17/doc directory, try reading the CircleMUD FAQ at ftp://ftp.circlemud.org/pub/CircleMUD/FAQ. If all else fails, you can send me or Jeremy Elson mail for help. Note, however, that if you ask me any question that is answered in these documents, all we'll do is mail you the appropriate @@ -118,3 +118,26 @@ by Jeremy Elson. -David Goldstein + + +--- Additional items of note. + +* Make sure /bin points somewhere useful, like your + /cygnus/cygwin-b20/H-i586-cygwin32/bin directory. + If you didn't follow the directions given in #2 + above, you can do the following command: + + ln -s /cygnus/cygwin-b20/H-i586-cygwin32/bin /bin + + Obviously you'll need to adjust the path if you + do not keep your installation in c:\cygnus. + +* Make sure /tmp exists. You can either make it a + real directory or point it at the system temp + folder with: + + ln -s /windows/temp /tmp + +(Information from Tony Robbins.) + +-George Greer Index: circle/doc/README.MSVC6 diff -u circle/doc/README.MSVC6:1.1 circle/doc/README.MSVC6:1.2 --- circle/doc/README.MSVC6:1.1 Fri Mar 26 10:37:50 1999 +++ circle/doc/README.MSVC6 Sat Sep 11 22:26:19 1999 @@ -8,8 +8,7 @@ Compiling with MS Visual C++ 6.0: -1. In the src directory, rename conf.h to conf.h.orig and rename conf.h.win - to conf.h. +1. In the src directory, rename conf.h.win to conf.h. 2. Go to File|New... Create a new workspace called circle. Put the root directory path into the location field. Index: circle/src/Makefile.lcc diff -u circle/src/Makefile.lcc:1.4 circle/src/Makefile.lcc:1.5 --- circle/src/Makefile.lcc:1.4 Tue Nov 3 09:58:05 1998 +++ circle/src/Makefile.lcc Mon Aug 30 19:12:01 1999 @@ -1,4 +1,4 @@ -# Makefile for LCC-Win32 compile of CircleMUD 3.0bpl14 +# Makefile for LCC-Win32 compile of CircleMUD 3.0bpl17 # Created by Eric Jones (mailto:fpicard@mindless.com) # 08/31/98 @@ -6,14 +6,13 @@ # to \LCC instead of \LCCPUB as in older versions # Added DISTDIR variable to allow for an easy way to change # where Circle is located, plus will allow for changes in the -# path between versions (bpl14 is circle30bpl14, next version -# should be circle30bpl15). +# path between versions (e.g. bpl17 is circle30bpl17) # With addition of new variables as replacements for old # hard-coded paths, display lines will be less than 80 columns # thus less clutter on the screen during the make LCCDIR=c:\lccpub -DISTDIR=c:\circle30bpl14 +DISTDIR=c:\circle30bpl17 CFLAGS=-c -I$(LCCDIR)\include -DLCC_WIN32 CC=lcc OBJS=\ Index: circle/src/act.comm.c diff -u circle/src/act.comm.c:1.17 circle/src/act.comm.c:1.18 --- circle/src/act.comm.c:1.17 Thu Jun 24 03:26:38 1999 +++ circle/src/act.comm.c Sun Jan 23 13:24:53 2000 @@ -202,14 +202,24 @@ struct char_data *vict; const char *action_sing, *action_plur, *action_others; - if (subcmd == SCMD_WHISPER) { + switch (subcmd) { + case SCMD_WHISPER: action_sing = "whisper to"; action_plur = "whispers to"; action_others = "$n whispers something to $N."; - } else { + break; + + case SCMD_ASK: action_sing = "ask"; action_plur = "asks"; action_others = "$n asks $N a question."; + break; + + default: + action_sing = "oops"; + action_plur = "oopses"; + action_others = "$n is tongue-tied trying to speak with $N."; + break; } half_chop(argument, buf, buf2); Index: circle/src/act.informative.c diff -u circle/src/act.informative.c:1.27 circle/src/act.informative.c:1.28 --- circle/src/act.informative.c:1.27 Thu Jun 3 16:26:13 1999 +++ circle/src/act.informative.c Thu Jan 20 16:16:03 2000 @@ -203,7 +203,8 @@ found = TRUE; if (found) { - act("\r\n$n is using:", FALSE, i, 0, ch, TO_VICT); + send_to_char("\r\n", ch); /* act() does capitalization. */ + act("$n is using:", FALSE, i, 0, ch, TO_VICT); for (j = 0; j < NUM_WEARS; j++) if (GET_EQ(i, j) && CAN_SEE_OBJ(ch, GET_EQ(i, j))) { send_to_char(where[j], ch); Index: circle/src/act.item.c diff -u circle/src/act.item.c:1.29 circle/src/act.item.c:1.30 --- circle/src/act.item.c:1.29 Sat Aug 28 11:01:39 1999 +++ circle/src/act.item.c Wed Nov 24 17:58:14 1999 @@ -1126,7 +1126,7 @@ "You wear $p around your neck."}, {"$n wears $p on $s body.", - "You wear $p on your body.",}, + "You wear $p on your body."}, {"$n wears $p on $s head.", "You wear $p on your head."}, Index: circle/src/act.wizard.c diff -u circle/src/act.wizard.c:1.39 circle/src/act.wizard.c:1.41 --- circle/src/act.wizard.c:1.39 Sun Jun 6 16:24:48 1999 +++ circle/src/act.wizard.c Sun Jan 23 12:28:04 2000 @@ -1033,14 +1033,25 @@ if (ch->desc && ch->desc->original) { send_to_char("You return to your original body.\r\n", ch); - /* JE 2/22/95 */ - /* if someone switched into your original body, disconnect them */ - if (ch->desc->original->desc) + /* + * If someone switched into your original body, disconnect them. + * - JE 2/22/95 + * + * Zmey: here we put someone switched in our body to disconnect state + * but we must also NULL his pointer to our character, otherwise + * close_socket() will damage our character's pointer to our descriptor + * (which is assigned below in this function). 12/17/99 + */ + if (ch->desc->original->desc) { + ch->desc->original->desc->character = NULL; STATE(ch->desc->original->desc) = CON_DISCONNECT; + } + /* Now our descriptor points to our original body. */ ch->desc->character = ch->desc->original; ch->desc->original = NULL; + /* And our body's pointer to descriptor now points to our descriptor. */ ch->desc->character->desc = ch->desc; ch->desc = NULL; } @@ -1479,17 +1490,34 @@ * various people pointed out this could cause a crash if you're * closing the person below you on the descriptor list. Just setting * to CON_CLOSE leaves things in a massively inconsistent state so I - * had to add this new flag to the descriptor. + * had to add this new flag to the descriptor. -je * * It is a much more logical extension for a CON_DISCONNECT to be used * for in-game socket closes and CON_CLOSE for out of game closings. * This will retain the stability of the close_me hack while being * neater in appearance. -gg 12/1/97 + * + * For those unlucky souls who actually manage to get disconnected + * by two different immortals in the same 1/10th of a second, we have + * the below 'if' check. -gg 12/17/99 */ - STATE(d) = CON_DISCONNECT; - sprintf(buf, "Connection #%d closed.\r\n", num_to_dc); - send_to_char(buf, ch); - log("(GC) Connection closed by %s.", GET_NAME(ch)); + if (STATE(d) == CON_DISCONNECT || STATE(d) == CON_CLOSE) + send_to_char("They're already being disconnected.\r\n", ch); + else { + /* + * Remember that we can disconnect people not in the game and + * that rather confuses the code when it expected there to be + * a character context. + */ + if (STATE(d) == CON_PLAYING) + STATE(d) = CON_DISCONNECT; + else + STATE(d) = CON_CLOSE; + + sprintf(buf, "Connection #%d closed.\r\n", num_to_dc); + send_to_char(buf, ch); + log("(GC) Connection closed by %s.", GET_NAME(ch)); + } } @@ -2066,7 +2094,7 @@ break; case 7: strcpy(buf, "Godrooms\r\n--------------------------\r\n"); - for (i = 0, j = 0; i < top_of_world; i++) + for (i = 0, j = 0; i <= top_of_world; i++) if (ROOM_FLAGGED(i, ROOM_GODROOM)) sprintf(buf + strlen(buf), "%2d: [%5d] %s\r\n", ++j, GET_ROOM_VNUM(i), world[i].name); Index: circle/src/comm.c diff -u circle/src/comm.c:1.77 circle/src/comm.c:1.80 --- circle/src/comm.c:1.77 Sun Aug 1 17:30:33 1999 +++ circle/src/comm.c Sun Jan 23 12:21:32 2000 @@ -118,9 +118,9 @@ int get_from_q(struct txt_q *queue, char *dest, int *aliased); void init_game(ush_int port); void signal_setup(void); -void game_loop(int mother_desc); -int init_socket(ush_int port); -int new_descriptor(int s); +void game_loop(socket_t mother_desc); +socket_t init_socket(ush_int port); +int new_descriptor(socket_t s); int get_max_players(void); int process_output(struct descriptor_data *t); int process_input(struct descriptor_data *t); @@ -325,7 +325,7 @@ /* Init sockets, run game, and cleanup sockets */ void init_game(ush_int port) { - int mother_desc; + socket_t mother_desc; /* We don't want to restart if we crash before we get up. */ touch(KILLSCRIPT_FILE); @@ -374,10 +374,11 @@ * init_socket sets up the mother descriptor - creates the socket, sets * its options up, binds it, and listens. */ -int init_socket(ush_int port) +socket_t init_socket(ush_int port) { - int s, opt; + socket_t s; struct sockaddr_in sa; + int opt; #ifdef CIRCLE_WINDOWS { @@ -554,7 +555,7 @@ * output and sending it out to players, and calling "heartbeat" functions * such as mobile_activity(). */ -void game_loop(int mother_desc) +void game_loop(socket_t mother_desc) { fd_set input_set, output_set, exc_set, null_set; struct timeval last_time, opt_time, process_time, temp_time; @@ -925,13 +926,7 @@ (char) IAC, (char) WONT, (char) TELOPT_ECHO, - (char) IAC, - (char) WONT, - (char) TELOPT_NAOFFD, - (char) IAC, - (char) WONT, - (char) TELOPT_NAOCRD, - (char) 0, + (char) 0 }; SEND_TO_Q(on_string, d); @@ -1558,6 +1553,15 @@ /* * ASSUMPTION: There will be no newlines in the raw input buffer when this * function is called. We must maintain that before returning. + * + * Ever wonder why 'tmp' had '+8' on it? The crusty old code could write + * MAX_INPUT_LENGTH+1 bytes to 'tmp' if there was a '$' as the final + * character in the input buffer. This would also cause 'space_left' to + * drop to -1, which wasn't very happy in an unsigned variable. Argh. + * So to fix the above, 'tmp' lost the '+8' since it doesn't need it + * and the code has been changed to reserve space by accepting one less + * character. (Do you really need 256 characters on a line?) + * -gg 1/21/2000 */ int process_input(struct descriptor_data *t) { @@ -1565,7 +1569,7 @@ ssize_t bytes_read; size_t space_left; char *ptr, *read_point, *write_point, *nl_pos = NULL; - char tmp[MAX_INPUT_LENGTH + 8]; + char tmp[MAX_INPUT_LENGTH]; /* first, find the point where we left off reading data */ buf_length = strlen(t->inbuf); @@ -1627,7 +1631,8 @@ write_point = tmp; space_left = MAX_INPUT_LENGTH - 1; - for (ptr = read_point; (space_left > 0) && (ptr < nl_pos); ptr++) { + /* The '> 1' reserves room for a '$ => $$' expansion. */ + for (ptr = read_point; (space_left > 1) && (ptr < nl_pos); ptr++) { if (*ptr == '\b' || *ptr == 127) { /* handle backspacing or delete key */ if (write_point > tmp) { if (*(--write_point) == '$') { @@ -2174,6 +2179,7 @@ default: log("SYSERR: Illegal $-code to act(): %c", *orig); log("SYSERR: %s", orig); + i = ""; break; } while ((*buf = *(i++))) Index: circle/src/constants.c diff -u circle/src/constants.c:1.13 circle/src/constants.c:1.14 --- circle/src/constants.c:1.13 Wed Mar 17 09:38:17 1999 +++ circle/src/constants.c Sat Aug 28 21:12:23 1999 @@ -15,7 +15,7 @@ #include "interpreter.h" /* alias_data */ cpp_extern const char *circlemud_version = - "CircleMUD, version 3.00 beta patchlevel 16"; + "CircleMUD, version 3.00 beta patchlevel 17"; /* strings corresponding to ordinals/bitvectors in structs.h ***********/ Index: circle/src/db.c diff -u circle/src/db.c:1.50 circle/src/db.c:1.53 --- circle/src/db.c:1.50 Sun Jul 4 20:34:05 1999 +++ circle/src/db.c Sun Jan 23 13:24:53 2000 @@ -486,7 +486,8 @@ scan = key; do { scan = one_word(scan, next_key); - ++total_keywords; + if (*next_key) + ++total_keywords; } while (*next_key); /* get next keyword line (or $) */ @@ -1236,7 +1237,6 @@ obj_index[i].func = NULL; clear_object(obj_proto + i); - obj_proto[i].in_room = NOWHERE; obj_proto[i].item_number = i; sprintf(buf2, "object #%d", nr); @@ -1876,10 +1876,18 @@ { struct descriptor_data *i; - for (i = descriptor_list; i; i = i->next) - if (STATE(i) == CON_PLAYING) - if (world[i->character->in_room].zone == zone_nr) - return (0); + for (i = descriptor_list; i; i = i->next) { + if (STATE(i) != CON_PLAYING) + continue; + if (IN_ROOM(i->character) == NOWHERE) + continue; + if (GET_LEVEL(i->character) >= LVL_IMMORT) + continue; + if (world[i->character->in_room].zone != zone_nr) + continue; + + return (0); + } return (1); } @@ -2355,10 +2363,10 @@ int file_to_string_alloc(const char *name, char **buf) { char temp[MAX_STRING_LENGTH]; - struct descriptor_data *using; + struct descriptor_data *in_use; - for (using = descriptor_list; using; using = using->next) - if (using->showstr_vector && *using->showstr_vector == *buf) + for (in_use = descriptor_list; in_use; in_use = in_use->next) + if (in_use->showstr_vector && *in_use->showstr_vector == *buf) return (-1); /* Lets not free() what used to be there unless we succeeded. */ Index: circle/src/house.c diff -u circle/src/house.c:1.21 circle/src/house.c:1.23 --- circle/src/house.c:1.21 Sun May 9 21:55:59 1999 +++ circle/src/house.c Sun Jan 23 12:15:00 2000 @@ -51,7 +51,7 @@ /* Return a filename given a house vnum */ int House_get_filename(int vnum, char *filename) { - if (vnum < 0) + if (vnum == NOWHERE) return (0); sprintf(filename, LIB_HOUSE"%d.house", vnum); @@ -68,7 +68,7 @@ room_rnum rnum; int i; - if ((rnum = real_room(vnum)) == -1) + if ((rnum = real_room(vnum)) == NOWHERE) return (0); if (!House_get_filename(vnum, fname)) return (0); @@ -131,7 +131,7 @@ char buf[MAX_STRING_LENGTH]; FILE *fp; - if ((rnum = real_room(vnum)) == -1) + if ((rnum = real_room(vnum)) == NOWHERE) return; if (!House_get_filename(vnum, buf)) return; @@ -219,7 +219,7 @@ if (house_control[i].vnum == vnum) return (i); - return (-1); + return (NOWHERE); } @@ -266,13 +266,13 @@ if (get_name_by_id(temp_house.owner) == NULL) continue; /* owner no longer exists -- skip */ - if ((real_house = real_room(temp_house.vnum)) < 0) + if ((real_house = real_room(temp_house.vnum)) == NOWHERE) continue; /* this vnum doesn't exist -- skip */ - if (find_house(temp_house.vnum) >= 0) + if (find_house(temp_house.vnum) != NOWHERE) continue; /* this vnum is already a house -- skip */ - if ((real_atrium = real_room(temp_house.atrium)) < 0) + if ((real_atrium = real_room(temp_house.atrium)) == NOWHERE) continue; /* house doesn't have an atrium -- skip */ if (temp_house.exit_num < 0 || temp_house.exit_num >= NUM_OF_DIRS) @@ -370,11 +370,11 @@ return; } virt_house = atoi(arg1); - if ((real_house = real_room(virt_house)) < 0) { + if ((real_house = real_room(virt_house)) == NOWHERE) { send_to_char("No such room exists.\r\n", ch); return; } - if ((find_house(virt_house)) >= 0) { + if ((find_house(virt_house)) != NOWHERE) { send_to_char("House already exists.\r\n", ch); return; } @@ -447,17 +447,17 @@ send_to_char(HCONTROL_FORMAT, ch); return; } - if ((i = find_house(atoi(arg))) < 0) { + if ((i = find_house(atoi(arg))) == NOWHERE) { send_to_char("Unknown house.\r\n", ch); return; } - if ((real_atrium = real_room(house_control[i].atrium)) < 0) + if ((real_atrium = real_room(house_control[i].atrium)) == NOWHERE) log("SYSERR: House %d had invalid atrium %d!", atoi(arg), house_control[i].atrium); else REMOVE_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM); - if ((real_house = real_room(house_control[i].vnum)) < 0) + if ((real_house = real_room(house_control[i].vnum)) == NOWHERE) log("SYSERR: House %d had invalid vnum %d!", atoi(arg), house_control[i].vnum); else REMOVE_BIT(ROOM_FLAGS(real_house), @@ -479,7 +479,7 @@ * house. --JE 9/19/94 */ for (i = 0; i < num_of_houses; i++) - if ((real_atrium = real_room(house_control[i].atrium)) >= 0) + if ((real_atrium = real_room(house_control[i].atrium)) != NOWHERE) SET_BIT(ROOM_FLAGS(real_atrium), ROOM_ATRIUM); } @@ -490,7 +490,7 @@ if (!*arg) send_to_char(HCONTROL_FORMAT, ch); - else if ((i = find_house(atoi(arg))) < 0) + else if ((i = find_house(atoi(arg))) == NOWHERE) send_to_char("Unknown house.\r\n", ch); else { sprintf(buf, "Payment for house %s collected by %s.", arg, GET_NAME(ch)); @@ -532,7 +532,7 @@ if (!ROOM_FLAGGED(IN_ROOM(ch), ROOM_HOUSE)) send_to_char("You must be in your house to set guests.\r\n", ch); - else if ((i = find_house(GET_ROOM_VNUM(IN_ROOM(ch)))) < 0) + else if ((i = find_house(GET_ROOM_VNUM(IN_ROOM(ch)))) == NOWHERE) send_to_char("Um.. this house seems to be screwed up.\r\n", ch); else if (GET_IDNUM(ch) != house_control[i].owner) send_to_char("Only the primary owner can set guests.\r\n", ch); @@ -586,7 +586,7 @@ { int i, j; - if (GET_LEVEL(ch) >= LVL_GRGOD || (i = find_house(house)) < 0) + if (GET_LEVEL(ch) >= LVL_GRGOD || (i = find_house(house)) == NOWHERE) return (1); switch (house_control[i].mode) { Index: circle/src/interpreter.c diff -u circle/src/interpreter.c:1.21 circle/src/interpreter.c:1.23 --- circle/src/interpreter.c:1.21 Tue Jul 20 12:19:46 1999 +++ circle/src/interpreter.c Sun Jan 23 13:24:53 2000 @@ -139,7 +139,6 @@ ACMD(do_quit); ACMD(do_reboot); ACMD(do_remove); -ACMD(do_rent); ACMD(do_reply); ACMD(do_report); ACMD(do_rescue); @@ -1714,11 +1713,13 @@ } break; -/* Taken care of in game_loop() + /* + * It's possible, if enough pulses are missed, to kick someone off + * while they are at the password prompt. We'll just defer to let + * the game_loop() axe them. + */ case CON_CLOSE: - close_socket(d); break; -*/ default: log("SYSERR: Nanny: illegal state of con'ness (%d) for '%s'; closing connection.", Index: circle/src/modify.c diff -u circle/src/modify.c:1.21 circle/src/modify.c:1.22 --- circle/src/modify.c:1.21 Sun Jul 4 20:41:12 1999 +++ circle/src/modify.c Sun Jan 23 12:26:56 2000 @@ -121,11 +121,14 @@ if (!(*d->str)) { if (strlen(str) + 3 > d->max_str) { /* \r\n\0 */ send_to_char("String too long - Truncated.\r\n", d->character); - str[d->max_str] = '\0'; + strcpy(&str[d->max_str - 3], "\r\n"); + CREATE(*d->str, char, d->max_str); + strcpy(*d->str, str); terminator = 1; + } else { + CREATE(*d->str, char, strlen(str) + 3); + strcpy(*d->str, str); } - CREATE(*d->str, char, strlen(str) + 3); - strcpy(*d->str, str); } else { if (strlen(str) + strlen(*d->str) + 3 > d->max_str) { /* \r\n\0 */ send_to_char("String too long. Last line skipped.\r\n", d->character); Index: circle/src/spec_assign.c diff -u circle/src/spec_assign.c:1.7 circle/src/spec_assign.c:1.8 --- circle/src/spec_assign.c:1.7 Mon Oct 5 12:39:23 1998 +++ circle/src/spec_assign.c Tue Dec 14 10:02:38 1999 @@ -301,7 +301,7 @@ ASSIGNROOM(3031, pet_shops); if (dts_are_dumps) - for (i = 0; i < top_of_world; i++) + for (i = 0; i <= top_of_world; i++) if (ROOM_FLAGGED(i, ROOM_DEATH)) world[i].func = dump; } Index: circle/src/structs.h diff -u circle/src/structs.h:1.28 circle/src/structs.h:1.30 --- circle/src/structs.h:1.28 Fri Apr 30 23:06:19 1999 +++ circle/src/structs.h Thu Jan 20 16:20:16 2000 @@ -17,7 +17,7 @@ * You are supposed to compare this with the macro CIRCLEMUD_VERSION() * in utils.h. See there for usage. */ -#define _CIRCLEMUD 0x030010 /* Major/Minor/Patchlevel - MMmmPP */ +#define _CIRCLEMUD 0x030011 /* Major/Minor/Patchlevel - MMmmPP */ /* * If you want equipment to be automatically equipped to the same place @@ -31,6 +31,12 @@ /* preamble *************************************************************/ +/* + * Eventually we want to be able to redefine the below to any arbitrary + * value. This will allow us to use unsigned data types to get more + * room and also remove the '< 0' checks all over that implicitly + * assume these values. -gg 12/17/99 + */ #define NOWHERE -1 /* nil reference for room-database */ #define NOTHING -1 /* nil reference for objects */ #define NOBODY -1 /* nil reference for mobiles */