Changeset 718
- Timestamp:
- 03/11/07 20:37:38 (1 year ago)
- Files:
-
- 1.8.3/trunk/CHANGES.182 (modified) (1 diff)
- 1.8.3/trunk/CHANGES.183 (modified) (1 diff)
- 1.8.3/trunk/Configure (modified) (4 diffs)
- 1.8.3/trunk/MANIFEST (modified) (1 diff)
- 1.8.3/trunk/Makefile.SH (modified) (1 diff)
- 1.8.3/trunk/Patchlevel (modified) (1 diff)
- 1.8.3/trunk/README.SQL (modified) (5 diffs)
- 1.8.3/trunk/config_h.SH (modified) (1 diff)
- 1.8.3/trunk/game/mushcnf.dst (modified) (1 diff)
- 1.8.3/trunk/game/restart (modified) (1 diff)
- 1.8.3/trunk/game/txt/hlp/pennchat.hlp (modified) (1 diff)
- 1.8.3/trunk/game/txt/hlp/penncmd.hlp (modified) (6 diffs)
- 1.8.3/trunk/game/txt/hlp/pennv182.hlp (modified) (2 diffs)
- 1.8.3/trunk/game/txt/hlp/pennv183.hlp (modified) (2 diffs)
- 1.8.3/trunk/game/txt/hlp/pennvOLD.hlp (modified) (1 diff)
- 1.8.3/trunk/hdrs/atr_tab.h (modified) (1 diff)
- 1.8.3/trunk/hdrs/conf.h (modified) (4 diffs)
- 1.8.3/trunk/hdrs/externs.h (modified) (2 diffs)
- 1.8.3/trunk/hdrs/version.h (modified) (1 diff)
- 1.8.3/trunk/hints/netbsd.sh (copied) (copied from 1.8.3/branches/devel/hints/netbsd.sh)
- 1.8.3/trunk/src/attrib.c (modified) (1 diff)
- 1.8.3/trunk/src/bsd.c (modified) (5 diffs)
- 1.8.3/trunk/src/command.c (modified) (2 diffs)
- 1.8.3/trunk/src/conf.c (modified) (5 diffs)
- 1.8.3/trunk/src/cque.c (modified) (3 diffs)
- 1.8.3/trunk/src/filecopy.c (modified) (1 diff)
- 1.8.3/trunk/src/funlist.c (modified) (17 diffs)
- 1.8.3/trunk/src/funmisc.c (modified) (2 diffs)
- 1.8.3/trunk/src/funstr.c (modified) (2 diffs)
- 1.8.3/trunk/src/funtime.c (modified) (3 diffs)
- 1.8.3/trunk/src/rob.c (modified) (2 diffs)
- 1.8.3/trunk/src/speech.c (modified) (5 diffs)
- 1.8.3/trunk/src/sql.c (modified) (12 diffs)
- 1.8.3/trunk/src/utils.c (modified) (2 diffs)
- 1.8.3/trunk/test/teststringsecs.pl (copied) (copied from 1.8.3/branches/devel/test/teststringsecs.pl)
- 1.8.3/trunk/utils/mkvershlp.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/trunk/CHANGES.182
r654 r718 14 14 15 15 ========================================================================== 16 17 Version 1.8.2 patchlevel 3 March 11, 2007 18 19 Fixes: 20 * Unterminated buffer in sortkey() fixed. Reported by Balerion. 21 Patch by Javelin. 22 * Memory leaks in setunion() and revwords() fixed by Javelin. 23 * Crash bug in speak() fixed. Reported by Trinsec. Patch by Javelin. 24 * Crash bug in buy fixed. Reported by Amy. Patch by Javelin. 25 * If we should fail to clear a semaphore attribute for some 26 reason (e.g., it's the branch of an attribute tree), reset 27 the semaphore count on the attribute to 0. Patch by Javelin. 28 * iter() dealt badly with freeing buffers when CPU_LIMIT or 29 function_invocation_limit was hit. Found by Ashen-Shugar. [GM] 30 * @ps/all displayed the wrong queue entry count for mortals. 31 Reported by Cheetah. [SW] 32 * @hook/override of say would get an extra leading " if that was 33 used instead of the literal say command. Reported by Tuxedo Ian. 34 [SW] 35 * Fixed a bug where speech seemed to come from the wrong 36 object for nospoof information. Reported by Jules. [SW] 37 * The help entry for @poll failed to mention @poll/clear. 38 Reported by Cooee. [SW] 16 39 17 40 Version 1.8.2 patchlevel 2 January 27, 2007 1.8.3/trunk/CHANGES.183
r654 r718 15 15 ========================================================================== 16 16 17 Version 1.8.3 patchlevel 1 March 11, 2007 18 19 Minor changes: 20 * page command now processes page output through PAGEFORMAT 21 attribute, allowing user-set page messages. [GM] 22 * sql_host configuration option now permits alternate tcp port. 23 Suggested by Mercutio. Patch by Javelin. 24 * Refactoring of fun_stringsecs to help function etime_to_secs. 25 Patch by Javelin. 26 * %1 in @aconnect works like in @adisconnect. Patch by Javelin. 27 28 Fixes: 29 * restart script once again includes DATEMSK export for 30 extended convtime support. Reported by KimikoMuffin. 31 * Memory leak in 1.8.3p0 regedit fixed. 32 * Fixes included from 1.8.2p3. 33 * Document change in @chan/title behavior with commas. 34 17 35 Version 1.8.3 patchlevel 0 January 27, 2007 18 36 19 37 Major changes: 20 * Rewrite of color handling. [GM]38 * Rewrite of color handling. [GM] 21 39 22 40 Minor changes: 1.8.3/trunk/Configure
r525 r718 421 421 d_mysql='' 422 422 libmysqlclient='' 423 d_postgresql='' 424 libpq='' 423 425 glibpth='' 424 426 libpth='' … … 4965 4967 fi 4966 4968 4969 : see if we should include -lpq 4970 echo " " 4971 4972 d_postgresql="$undef" 4973 4974 if $test "x$no_postgresql" = "x"; then 4975 4976 libpq="-lpq" 4977 4978 $cat > test_postgresql.c <<EOM 4979 #include <stdio.h> 4980 #include <stdlib.h> 4981 #include <postgresql/libpq-fe.h> 4982 4983 int main(int argc, char **argv) { 4984 const char *conninfo = "dbname = postgres"; 4985 PGconn *conn; 4986 conn = PQconnectdb(conninfo); 4987 PQfinish(conn); 4988 exit(0); 4989 } 4990 EOM 4991 4992 if $cc $ccflags $ldflags -o test_postgresql test_postgresql.c $libs $libpq >/dev/null 2>&1 ; 4993 then 4994 echo 'You have postgresql...' >&4 4995 version=`./test_postgresql` 4996 if $test $? -eq 0; then 4997 d_postgresql="$define" 4998 else 4999 echo "...but my test program didn't run correctly." >&4 5000 libpq='' 5001 fi 5002 else 5003 echo "You don't seem to have postgresql." >&4 5004 libpq='' 5005 fi 5006 $rm -f test_postgresql* core 5007 5008 else 5009 5010 echo "Skipping postgresql tests." >&4 5011 libpq='' 5012 5013 fi 5014 4967 5015 : see if rename exists 4968 5016 set rename d_rename … … 7028 7076 d_passnames='$d_passnames' 7029 7077 d_portable='$d_portable' 7078 d_postgresql='$d_postgresql' 7030 7079 d_rand='$d_rand' 7031 7080 d_random='$d_random' … … 7150 7199 libc='$libc' 7151 7200 libmysqlclient='$libmysqlclient' 7201 libpq='$libpq' 7152 7202 libpth='$libpth' 7153 7203 libs='$libs' 1.8.3/trunk/MANIFEST
r654 r718 185 185 src/look.c 186 186 src/malias.c 187 src/markup.c 187 188 src/match.c 188 189 src/memcheck.c 1.8.3/trunk/Makefile.SH
r654 r718 49 49 CCFLAGS=$optimize -I.. -I../hdrs $ccflags $warnings 50 50 LDFLAGS=$ldflags 51 CLIBS=$libs $cryptlib $libssl $libmysqlclient 51 CLIBS=$libs $cryptlib $libssl $libmysqlclient $libpq 52 52 INSTALL=$install 53 53 INSTALLDIR=$installdir 1.8.3/trunk/Patchlevel
r654 r718 1 1 Do not edit this file. It is maintained by the official PennMUSH patches. 2 This is PennMUSH 1.8.3p 02 This is PennMUSH 1.8.3p1 1.8.3/trunk/README.SQL
r515 r718 9 9 10 10 * MySQL 11 * PostgresQL (from 1.8.3p2) 11 12 12 13 This document explains how to use (or avoid) SQL with PennMUSH, and covers … … 17 18 III. SQL setup tips 18 19 19 I. Compiling with MySQL 20 I. Compiling with/without SQL 21 22 In general, Configure attempts to detect all support sql client 23 libraries on the host, and will link with all of them, permitting 24 you to select which platform you want at runtime. You can selectively 25 prevent linking with client libraries that are present on your 26 system, as well; this is described below. 27 28 I.a. MySQL 20 29 21 30 The Configure script distributed with PennMUSH automatically detects … … 37 46 to fix this. 38 47 48 I.b. PostgresQL 49 50 The Configure script distributed with PennMUSH automatically detects 51 the PostgresQL client library (libpq) and attempts to link 52 them into the executable, defining HAS_POSTGRESQL in config.h 53 54 If you want to avoid linking these libraries on systems where they 55 are present, use the '-D no_postgresql' switch to Configure. 56 57 If you installed PostgresQL from a binary package (e.g. rpm or apt), 58 you should be sure that your system also has the development 59 package (usually postgresql-dev, or libpq or similar) 60 61 If you think you have posgresql libraries and header files but 62 Configure isn't finding them, they may be in an unusual location on 63 your system. Creating symbolic links from the header directory to 64 /usr/include/postgresql and from the libraries in /usr/lib (or adding 65 the postgresql library directory to your /etc/ld.so.conf and running 66 ldconfig) are the easiest ways to fix this. 67 39 68 II. Mush configuration overview 40 69 … … 42 71 43 72 sql_platform provides the name of the SQL database server software 44 that will be used for connections. It current takes one of t wo45 values: "disabled" (no SQL) or "mysql". If not specified, it46 defaults to disabled.73 that will be used for connections. It current takes one of three 74 values: "disabled" (no SQL), "mysql", or "postgresql". If not specified, 75 it defaults to disabled. 47 76 48 77 sql_host gives the name of the host running the SQL server. 49 78 It defaults to 127.0.0.1, which makes a TCP connection to the 50 79 local host. The keyword "localhost" instead makes a domain socket 51 (Unix) or named pipe (Windows) connection. 80 (Unix) or named pipe (Windows) connection under MySQL. 81 You can also specify an alternate port by setting sql_host to 82 hostname:port (e.g. 127.0.0.1:5444). 52 83 53 84 sql_database gives the name of the database that contains the … … 117 148 Are you pretty sure you would like to implement this [yes/no]: yes 118 149 150 B. PostgresQL 151 152 As the postgres user: 153 154 % createuser -A -d -P mush 155 Enter password for new user: <=========== 156 CREATE USER 157 158 % createdb -U mush mush 159 Password: <=========== 160 CREATE DATABASE 161 1.8.3/trunk/config_h.SH
r517 r718 850 850 #$d_mysql HAS_MYSQL /**/ 851 851 852 /* HAS_POSTGRESQL: 853 * Defined if postgresql client libraries are available. 854 */ 855 #$d_postgresql HAS_POSTGRESQL /**/ 856 852 857 /* HAS_OPENSSL: 853 858 * Defined if openssl 0.9.6+ is available. 1.8.3/trunk/game/mushcnf.dst
r527 r718 559 559 560 560 # What SQL server platform should we use? Options include: 561 # mysql, disabled (the default)561 # mysql, postgresql, disabled (the default) 562 562 sql_platform disabled 563 563 564 564 # What's the SQL hostname? Use '127.0.0.1' for a TCP connection 565 # to the local host, and 'localhost' for a domain socket connection. 565 # to the local host on port 3306, '<hostip>:<port#>' for a TCP 566 # connection on another port (e.g. 127.0.0.1:3307), and 567 # the word 'localhost' for a domain socket connection. 566 568 sql_host 127.0.0.1 567 569 1.8.3/trunk/game/restart
r654 r718 139 139 140 140 DATEMSK="${GAMEDIR}/getdate.template" 141 export DATEMSK 141 142 142 143 LC_ALL=$LANG LANG=$LANG ./netmush $GAMEDIR/$CONF_FILE & 1.8.3/trunk/game/txt/hlp/pennchat.hlp
r654 r718 100 100 when you speak on the channel. If you leave the channel, your 101 101 title is cleared; use @channel/gag instead (see help @channel3). 102 You should escape any commas in your title with backslashes. 102 103 103 104 See "help @channel3" for more. 1.8.3/trunk/game/txt/hlp/penncmd.hlp
r654 r718 148 148 when a player connects in that location or zone (or, in the case of 149 149 the master room, anywhere). 150 151 One descriptor variable is passed to @aconnect: 152 %1 = number of player connections (1 if this is an initial connect) 150 153 151 154 See also: @adisconnect, ACTION LISTS … … 2588 2591 2589 2592 This changes your password. Please note that passwords ARE case-sensitive. 2590 2593 & @pageformat 2594 @pageformat <object> [=<message>] 2595 2596 Sets the message that is seen when <object> receives a page. <message> is 2597 evaluated. 2598 2599 %0 will be set to the page message. 2600 %1 will be set to ':' ';' or '"' for pose, semipose and normal page, 2601 respectively, 2602 %2 will be set to the alias of the pager, if any. 2603 %3 will be a space-separated list of recipient dbrefs. 2604 2605 To obtain 'page_aliases' behavior: 2606 > @pageformat me=[setq(0,%n[if(%2,%b(%2))],1,switch(%3,%!,,itemize(iter(%3, 2607 name(##),%b,|),|)))][switch(%1,",%q0 pages[if(%q1,%b%q1)]: %0,:,From 2608 afar[if(%q1,%b(to %q1))]\, %q0 %0,From afar[if(%q1,%b(to %q1))]\, %q0%0)] 2609 2610 To obtain no 'page_aliases' behavior: 2611 > @pageformat me=[setq(1,switch(%3,%!,,itemize(iter(%3,name(##),%b,|),|)))] 2612 [switch(%1,",%n pages[if(%q1,%b%q1)]: %0,:,From afar 2613 [if(%q1,%b(to %q1))]\, %n %0,From afar[if(%q1,%b(to %q1))]\, %n%0)] 2614 2615 See also: page, speak() 2591 2616 & @payment 2592 2617 @payment <object> [=<message>] … … 2693 2718 See also @emit, @oemit, @remit, NOSPOOF, and SPOOFING. 2694 2719 & @poll 2720 @poll 2695 2721 @poll <poll question> 2696 This wizard-only command sets the "poll" - the Doing question. If 2697 "@poll" is used by itself, the question is reset to the default 2698 string "Doing". It can also be used by those with the poll @power. 2722 @poll/clear 2723 2724 This command manipulate the message at the top of WHO/DOING. By itself, 2725 it displays the current poll. Wizards and those with the poll @power can 2726 set or clear the message. 2699 2727 2700 2728 See also: @doing, WHO, DOING … … 4017 4045 If you have already paged someone since connecting, just typing: 4018 4046 4019 page <message>4047 'page <message>' or 'page =<message>' 4020 4048 4021 4049 will send the message to the last person paged. You cannot page a … … 4042 4070 square brackets, in front of the message, in a fashion similar to 4043 4071 the way NOSPOOF flags emits. 4072 4073 When a player is paged, their PAGEFORMAT attribute is checked, and if 4074 exists, the page as viewed by the player is set to the results of 4075 calling PAGEFORMAT. See help @pageformat 4044 4076 4045 4077 Page takes five switches: /list, /blind, /noeval, /override, and /port. … … 4054 4086 including connections that have not yet logged into a player. 4055 4087 4056 See also: @lock, @alias, pose, :, ;, HAVEN, NOSPOOF, FLAGS4088 See also: @lock, @alias, @pageformat, pose, :, ;, HAVEN, NOSPOOF, FLAGS 4057 4089 & : 4058 4090 & ; 1.8.3/trunk/game/txt/hlp/pennv182.hlp
r654 r718 1 & 1.8.2p3 2 Version 1.8.2 patchlevel 3 March 11, 2007 3 4 Fixes: 5 * Unterminated buffer in sortkey() fixed. Reported by Balerion. 6 Patch by Javelin. 7 * Memory leaks in setunion() and revwords() fixed by Javelin. 8 * Crash bug in speak() fixed. Reported by Trinsec. Patch by Javelin. 9 * Crash bug in buy fixed. Reported by Amy. Patch by Javelin. 10 * If we should fail to clear a semaphore attribute for some 11 reason (e.g., it's the branch of an attribute tree), reset 12 the semaphore count on the attribute to 0. Patch by Javelin. 13 * iter() dealt badly with freeing buffers when CPU_LIMIT or 14 function_invocation_limit was hit. Found by Ashen-Shugar. [GM] 15 * @ps/all displayed the wrong queue entry count for mortals. 16 Reported by Cheetah. [SW] 17 * @hook/override of say would get an extra leading " if that was 18 used instead of the literal say command. Reported by Tuxedo Ian. 19 [SW] 20 * Fixed a bug where speech seemed to come from the wrong 21 object for nospoof information. Reported by Jules. [SW] 22 * The help entry for @poll failed to mention @poll/clear. 23 Reported by Cooee. [SW] 24 1 25 & 1.8.2p2 2 26 Version 1.8.2 patchlevel 2 January 27, 2007 … … 18 42 of the name for @ahear/@aahear/@amhear. [SW] 19 43 * Fixed the distribution of random numbers with a huge range. Reported 20 by Luke. 44 by Luke. 45 21 46 & 1.8.2p1 22 47 Version 1.8.2 patchlevel 1 November 26, 2006 1.8.3/trunk/game/txt/hlp/pennv183.hlp
r654 r718 1 & 1.8.3p 01 & 1.8.3p1 2 2 & changes 3 3 This is a list of changes in this patchlevel which are probably of … … 12 12 be read in 'help patchlevels'. 13 13 14 Version 1.8.3 patchlevel 1 March 11, 2007 15 16 Minor changes: 17 * page command now processes page output through PAGEFORMAT 18 attribute, allowing user-set page messages. [GM] 19 * sql_host configuration option now permits alternate tcp port. 20 Suggested by Mercutio. Patch by Javelin. 21 * Refactoring of fun_stringsecs to help function etime_to_secs. 22 Patch by Javelin. 23 * %1 in @aconnect works like in @adisconnect. Patch by Javelin. 24 25 Fixes: 26 * restart script once again includes DATEMSK export for 27 extended convtime support. Reported by KimikoMuffin. 28 * Memory leak in 1.8.3p0 regedit fixed. 29 * Fixes included from 1.8.2p3. 30 * Document change in @chan/title behavior with commas. 31 32 & 1.8.3p0 14 33 Version 1.8.3 patchlevel 0 January 27, 2007 15 34 16 35 Major changes: 17 * Rewrite of color handling. [GM]36 * Rewrite of color handling. [GM] 18 37 19 38 Minor changes: 1.8.3/trunk/game/txt/hlp/pennvOLD.hlp
r654 r718 4418 4418 type 'help <version>p<patchlevel>'. For example, 'help 1.7.2p3' 4419 4419 4420 1.8.3: 0 4421 1.8.2: 0, 1 4420 1.8.3: 0, 1 4421 1.8.2: 0, 1, 2, 3 4422 4422 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 4423 4423 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.8.3/trunk/hdrs/atr_tab.h
r519 r718 144 144 {"OZLEAVE", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 145 145 {"PAYMENT", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 146 {"PAGEFORMAT", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 146 147 {"PRICELIST", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 147 148 {"PREFIX", AF_NOPROG | AF_PREFIXMATCH, NULL_CHUNK_REFERENCE, 0, NULL}, 1.8.3/trunk/hdrs/conf.h
r525 r718 266 266 char trace_log[256]; /**< File to log trace data */ 267 267 char checkpt_log[256]; /**< File to log checkpoint data */ 268 #ifdef HAS_MYSQL269 268 char sql_platform[256]; /**< Type of SQL server, or "disabled" */ 270 269 char sql_host[256]; /**< Hostname of sql server */ … … 272 271 char sql_password[256]; /**< Password for sql */ 273 272 char sql_database[256]; /**< Database for sql */ 274 #endif275 273 }; 276 274 … … 433 431 #define TRACELOG (options.trace_log) 434 432 #define CHECKLOG (options.checkpt_log) 435 #ifdef HAS_MYSQL436 433 #define SQL_PLATFORM (options.sql_platform) 437 434 #define SQL_HOST (options.sql_host) … … 439 436 #define SQL_USER (options.sql_username) 440 437 #define SQL_PASS (options.sql_password) 441 #endif442 438 443 439 #define CHUNK_SWAP_FILE (options.chunk_swap_file) 1.8.3/trunk/hdrs/externs.h
r654 r718 257 257 extern void do_unlink(dbref player, const char *name); 258 258 extern dbref do_clone(dbref player, char *name, char *newname, int preserve); 259 260 /* From funtime.c */ 261 extern int etime_to_secs(char *str1, int *secs); 259 262 260 263 /* From game.c */ … … 527 530 char *ret, dbref executor, dbref enactor, 528 531 PE_Info * pe_info); 532 extern int call_attrib(dbref thing, const char *attrname, 533 const char *wenv_args[], int wenv_argc, char *ret, 534 dbref enactor, PE_Info * pe_info); 529 535 extern int member(dbref thing, dbref list); 530 536 extern int recursive_member(dbref disallow, dbref from, int count); 1.8.3/trunk/hdrs/version.h
r654 r718 1 1 #define VERSION "1.8.3" 2 #define PATCHLEVEL " 0"3 #define PATCHDATE "[0 1/27/2007]"4 #define NUMVERSION 100800300 02 #define PATCHLEVEL "1" 3 #define PATCHDATE "[03/11/2007]" 4 #define NUMVERSION 1008003001 1.8.3/trunk/src/attrib.c
r654 r718 448 448 num_new++; 449 449 } 450 /* Only GOD can create an AF_NODUMP attribute (used for semaphores) 451 * or add a leaf to a tree with such an attribute 452 */ 453 if ((AL_FLAGS(atr) & AF_NODUMP) && (player != GOD)) { 454 missing_name[0] = '\0'; 455 return AE_ERROR; 456 } 450 457 if (Cannot_Write_This_Attr(player, atr, 1)) { 451 458 missing_name[0] = '\0'; 1.8.3/trunk/src/bsd.c
r654 r718 3347 3347 dbref loc; 3348 3348 char tbuf1[BUFFER_LEN]; 3349 char *myenv[2]; 3349 3350 dbref zone; 3350 3351 dbref obj; … … 3416 3417 global_eval_context.rnxt[j] = NULL; 3417 3418 strcpy(global_eval_context.ccom, ""); 3419 /* And then load it up, as follows: 3420 * %0 (unused, reserved for "reason for disconnect") 3421 * %1 (number of connections after connect) 3422 */ 3423 myenv[0] = NULL; 3424 myenv[1] = mush_strdup(unparse_integer(num), "myenv"); 3425 for (j = 0; j < 2; j++) 3426 global_eval_context.wnxt[j] = myenv[j]; 3418 3427 3419 3428 /* do the person's personal connect action */ … … 3447 3456 (void) queue_attribute(obj, "ACONNECT", player); 3448 3457 } 3458 for (j = 0; j < 2; j++) 3459 if (myenv[j]) 3460 mush_free(myenv[j], "myenv"); 3461 for (j = 0; j < 10; j++) 3462 global_eval_context.wnxt[j] = NULL; 3463 strcpy(global_eval_context.ccom, ""); 3449 3464 } 3450 3465 … … 3787 3802 int start, count; 3788 3803 int powered = (*(called_as + 1) != 'M'); 3789 int objid = ( index(called_as, 'D') != NULL);3804 int objid = (strchr(called_as, 'D') != NULL); 3790 3805 3791 3806 if (!is_strict_integer(args[0]) || !is_strict_integer(args[1])) { … … 3845 3860 dbref victim; 3846 3861 int powered = ((*called_as == 'L') && Priv_Who(executor)); 3847 int objid = ( index(called_as, 'D') != NULL);3862 int objid = (strchr(called_as, 'D') != NULL); 3848 3863 3849 3864 first = 1; 1.8.3/trunk/src/command.c
r566 r718 249 249 {"@SQL", NULL, cmd_sql, CMD_T_ANY, "WIZARD", "SQL_OK"}, 250 250 #else 251 #ifdef HAS_POSTGRESQL 252 {"@SQL", NULL, cmd_sql, CMD_T_ANY, "WIZARD", "SQL_OK"}, 253 #else 251 254 {"@SQL", NULL, cmd_unimplemented, CMD_T_ANY, "WIZARD", "SQL_OK"}, 255 #endif 252 256 #endif 253 257 {"@SITELOCK", "BAN CHECK REGISTER REMOVE NAME", cmd_sitelock, … … 913 917 case SAY_TOKEN: 914 918 replacer = "SAY"; 919 #if 0 920 /* Messes up hooks when chat_strip_quote is yes. See bug #6677 */ 915 921 if (CHAT_STRIP_QUOTE) 916 922 p--; /* Since 'say' strips out the '"' */ 923 #endif 917 924 break; 918 925 case POSE_TOKEN: 1.8.3/trunk/src/conf.c
r654 r718 193 193 {"pueblo", cf_bool, &options.support_pueblo, 2, 0, "net"} 194 194 , 195 #ifdef HAS_MYSQL196 195 {"sql_platform", cf_str, options.sql_platform, sizeof options.sql_platform, 0, 197 196 "net"} … … 208 207 NULL} 209 208 , 210 #endif211 212 209 {"forking_dump", cf_bool, &options.forking_dump, 2, 0, "dump"} 213 210 , … … 1188 1185 #endif 1189 1186 options.mem_check = 0; 1190 #ifdef HAS_MYSQL1191 1187 strcpy(options.sql_platform, "disabled"); 1192 1188 strcpy(options.sql_database, ""); … … 1194 1190 strcpy(options.sql_password, ""); 1195 1191 strcpy(options.sql_host, "127.0.0.1"); 1196 #endif1197 1192 } 1198 1193 … … 1608 1603 notify(player, T(" The MUSH was compiled with MySQL support.")); 1609 1604 #endif 1605 #ifdef HAS_POSTGRESQL 1606 notify(player, T(" The MUSH was compiled with Postgresql support.")); 1607 #endif 1610 1608 1611 1609 #ifdef INFO_SLAVE 1.8.3/trunk/src/cque.c
r566 r718 124 124 num = parse_integer(atr_value(a)); 125 125 num += am; 126 if (num) { 127 sprintf(buff, "%d", num); 128 (void) atr_add(player, name, buff, GOD, flags); 129 } else { 126 /* We set the attribute's value to 0 even if we're going to clear 127 * it later, because clearing it may fail (perhaps someone's also 128 * foolishly using it as a branch in an attribute tree) 129 */ 130 sprintf(buff, "%d", num); 131 (void) atr_add(player, name, buff, GOD, flags); 132 if (!num) { 130 133 (void) atr_clr(player, name, GOD); 131 134 } … … 904 907 (*del)++; 905 908 else if (q_all || (Owner(tmp->player) == victim)) { 906 (*self)++; 907 if (!q_quiet && (LookQueue(player) 908 || Owns(tmp->player, player))) { 909 if ((LookQueue(player) 910 || Owns(tmp->player, player))) { 911 (*self)++; 912 if (q_quiet) 913 continue; 909 914 switch (q_type) { 910 915 case 1: /* wait queue */ 911 notify_format(player, "[%ld]%s: %s", tmp->left - mudtime,916 notify_format(player, "[%ld]%s: %s", tmp->left - mudtime, 912 917 unparse_object(player, tmp->player), tmp->comm); 913 918 break; 914 919 case 2: /* semaphore queue */ 915 920 if (tmp->left != 0) { 916 notify_format(player, "[#%d/%s/%ld]%s: %s", tmp->sem,921 notify_format(player, "[#%d/%s/%ld]%s: %s", tmp->sem, 917 922 tmp->semattr, tmp->left - mudtime, 918 923 unparse_object(player, tmp->player), tmp->comm); 919 924 } else { 920 notify_format(player, "[#%d/%s]%s: %s", tmp->sem,925 notify_format(player, "[#%d/%s]%s: %s", tmp->sem, 921 926 tmp->semattr, unparse_object(player, tmp->player), 922 927 tmp->comm); … … 924 929 break; 925 930 default: /* player or object queue */ 926 notify_format(player, "%s: %s", unparse_object(player,927 tmp->player),931 notify_format(player, "%s: %s", unparse_object(player, 932 tmp->player), 928 933 tmp->comm); 929 934 } 1.8.3/trunk/src/filecopy.c
r515 r718 207 207 char FileName[256]; 208 208 if (GetModuleFileName(NULL, FileName, 256) != 0) { 209 if (!strcasecmp( rindex(FileName, '\\') + 1, "pennmush.exe")) {209 if (!strcasecmp(strrchr(FileName, '\\') + 1, "pennmush.exe")) { 210 210 if (CopyFile("pennmush.exe", "pennmush_run.exe", FALSE)) { 211 211 do_rawlog(LT_ERR, "Successfully copied executable, starting copy."); 1.8.3/trunk/src/funlist.c
r654 r718 1212 1212 char outsep[BUFFER_LEN]; 1213 1213 int i; 1214 char tbuff[BUFFER_LEN];1215 char *tp;1216 char const *cp;1217 1214 char result[BUFFER_LEN]; 1218 char *rp; 1219 ATTR *attrib; 1220 dbref thing; 1215 ufun_attrib ufun; 1216 char *wenv[1]; 1221 1217 1222 1218 /* sortkey(attr,list,sort_type,delim,osep) */ … … 1234 1230 strcpy(outsep, args[4]); 1235 1231 1236 /* Find object and attribute to get sortby function from. */ 1237 parse_anon_attrib(executor, args[0], &thing, &attrib); 1238 if (!GoodObject(thing) || !attrib || !Can_Read_Attr(executor, thing, attrib)) { 1239 free_anon_attrib(attrib); 1240 return; 1241 } 1242 if (!CanEvalAttr(executor, thing, attrib)) { 1243 free_anon_attrib(attrib); 1244 return; 1245 } 1246 tp = tbuff; 1247 safe_str(atr_value(attrib), tbuff, &tp); 1248 *tp = '\0'; 1249 1232 /* find our object and attribute */ 1233 if (!fetch_ufun_attrib(args[0], executor, &ufun, 1)) 1234 return; 1250 1235 1251 1236 nptrs = list2arr_ansi(ptrs, MAX_SORTSIZE, args[1], sep); … … 1253 1238 /* Now we make a list of keys */ 1254 1239 for (i = 0; i < nptrs; i++) { 1255 global_eval_context.wenv[0] = (char *) ptrs[i]; 1256 rp = result; 1257 cp = tbuff; 1258 process_expression(result, &rp, &cp, 1259 thing, executor, enactor, 1260 PE_DEFAULT, PT_DEFAULT, pe_info); 1261 *rp = '\0'; 1240 /* Build our %0 args */ 1241 wenv[0] = (char *) ptrs[i]; 1242 call_ufun(&ufun, wenv, 2, result, executor, enactor, pe_info); 1262 1243 keys[i] = mush_strdup(result, "sortkey"); 1263 1244 } … … 1462 1443 char sep; 1463 1444 char **a1, **a2; 1464 int n1, n2, x1, x2, val ;1445 int n1, n2, x1, x2, val, orign1, orign2; 1465 1446 int lastx1, lastx2, found; 1466 1447 char *sort_type = ALPHANUM_LIST; … … 1481 1462 1482 1463 /* make arrays out of the lists */ 1483 n1 = list2arr_ansi(a1, MAX_SORTSIZE, args[0], sep);1484 n2 = list2arr_ansi(a2, MAX_SORTSIZE, args[1], sep);1464 orign1 = n1 = list2arr_ansi(a1, MAX_SORTSIZE, args[0], sep); 1465 orign2 = n2 = list2arr_ansi(a2, MAX_SORTSIZE, args[1], sep); 1485 1466 1486 1467 if (nargs < 4) { … … 1590 1571 } 1591 1572 } 1592 freearr(a1, n1);1593 freearr(a2, n2);1573 freearr(a1, orign1); 1574 freearr(a2, orign2); 1594 1575 mush_free((Malloc_t) a1, "ptrarray"); 1595 1576 mush_free((Malloc_t) a2, "ptrarray"); … … 2606 2587 { 2607 2588 char **words; 2608 int count ;2589 int count, origcount; 2609 2590 char sep; 2610 2591 char *osep, osepd[2] = { '\0', '\0' }; … … 2622 2603 words = (char **) mush_malloc(sizeof(char *) * BUFFER_LEN, "wordlist"); 2623 2604 2624 count = list2arr_ansi(words, BUFFER_LEN, args[0], sep);2605 origcount = count = list2arr_ansi(words, BUFFER_LEN, args[0], sep); 2625 2606 if (count == 0) { 2626 2607 mush_free((Malloc_t) words, "wordlist"); … … 2633 2614 safe_str(words[--count], buff, bp); 2634 2615 } 2635 freearr(words, count);2616 freearr(words, origcount); 2636 2617 mush_free((Malloc_t) words, "wordlist"); 2637 2618 } … … 2783 2764 sp = tbuf2; 2784 2765 if (process_expression(buff, bp, &sp, executor, caller, enactor, 2785 PE_DEFAULT, PT_DEFAULT, pe_info)) 2766 PE_DEFAULT, PT_DEFAULT, pe_info)) { 2767 mush_free((Malloc_t) tbuf2, "replace_string.buff"); 2786 2768 break; 2787 if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) 2769 } 2770 if (*bp == (buff + BUFFER_LEN - 1) && pe_info->fun_invocations == funccount) { 2771 mush_free((Malloc_t) tbuf2, "replace_string.buff"); 2788 2772 break; 2773 } 2789 2774 funccount = pe_info->fun_invocations; 2790 2775 oldbp = *bp; … … 3222 3207 3223 3208 /* Ansi-less regedits */ 3224 for (i =1 ; i < nargs - 1; i+= 2) {3209 for (i = 1; i < nargs - 1; i += 2) { 3225 3210 /* If this string has ANSI, switch to using ansi only */ 3226 if (strchr(postbuf,TAG_START)) break; 3227 3228 memcpy(prebuf,postbuf,BUFFER_LEN); 3211 if (strchr(postbuf, TAG_START)) 3212 break; 3213 3214 memcpy(prebuf, postbuf, BUFFER_LEN); 3229 3215 prelen = strlen(prebuf); 3230 3216 … … 3237 3223 r = args[i]; 3238 3224 process_expression(tbuf, &tbp, &r, executor, caller, enactor, PE_DEFAULT, 3239 PT_DEFAULT, pe_info);3225 PT_DEFAULT, pe_info); 3240 3226 *tbp = '\0'; 3241 3227 3242 3228 if ((re = pcre_compile(remove_markup(tbuf, &searchlen), 3243 flags, &errptr, &erroffset, tables)) == NULL) {3229 flags, &errptr, &erroffset, tables)) == NULL) { 3244 3230 /* Matching error. */ 3245 3231 safe_str(T("#-1 REGEXP ERROR: "), buff, bp); … … 3256 3242 study = pcre_study(re, 0, &errptr); 3257 3243 if (errptr != NULL) { 3258 mush_free((Malloc_t) re, "pcre");3259 safe_str(T("#-1 REGEXP ERROR: "), buff, bp);3260 safe_str(errptr, buff, bp);3261 free_ansi_string(orig);3262 return;3244 mush_free((Malloc_t) re, "pcre"); 3245 safe_str(T("#-1 REGEXP ERROR: "), buff, bp); 3246 safe_str(errptr, buff, bp); 3247 free_ansi_string(orig); 3248 return; 3263 3249 } 3264 3250 if (study != NULL) 3265 /* study */3266 add_check("pcre.extra");3251 /* study */ 3252 add_check("pcre.extra"); 3267 3253 } 3268 3254 … … 3277 3263 safe_str(prebuf, postbuf, &postp); 3278 3264 mush_free((Malloc_t) re, "pcre"); 3265 free_ansi_string(orig); 3279 3266 if (study) 3280 mush_free((Malloc_t) study, "pcre.extra");3267 mush_free((Malloc_t) study, "pcre.extra"); 3281 3268 continue; 3282 3269 } … … 3298 3285 global_eval_context.re_subpatterns = subpatterns; 3299 3286 process_expression(postbuf, &postp, &obp, executor, caller, enactor, 3300 PE_DEFAULT | PE_DOLLAR, PT_DEFAULT, pe_info);3287 PE_DEFAULT | PE_DOLLAR, PT_DEFAULT, pe_info); 3301 3288 if ((*bp == (buff + BUFFER_LEN - 1)) 3302 && (pe_info->fun_invocations == funccount))3303 break;3289 && (pe_info->fun_invocations == funccount)) 3290 break; 3304 3291 3305 3292 oldbp = postp; … … 3310 3297 /* Make sure we advance at least 1 char */ 3311 3298 if (offsets[0] == match_offset) 3312 match_offset++;3299 match_offset++; 3313 3300 } while (all && match_offset < prelen && 3314 (subpatterns = pcre_exec(re, study, prebuf, prelen,3315 match_offset, 0, offsets, 99)) >= 0);3301 (subpatterns = pcre_exec(re, study, prebuf, prelen, 3302 match_offset, 0, offsets, 99)) >= 0); 3316 3303 3317 3304 safe_str(start, postbuf, &postp); … … 3336 3323 r = args[i]; 3337 3324 process_expression(tbuf, &tbp, &r, executor, caller, enactor, PE_DEFAULT, 3338 PT_DEFAULT, pe_info);3325 PT_DEFAULT, pe_info); 3339 3326 *tbp = '\0'; 3340 3327 3341 3328 if ((re = pcre_compile(remove_markup(tbuf, &searchlen), 3342 flags, &errptr, &erroffset, tables)) == NULL) {3343 /* Matching error. */3344
