From 2fa30bc6849913175bb1b136524ffd5459dec57c Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Mon, 11 Sep 2006 19:22:44 +0000 Subject: [PATCH] Remainder of updates from 0.72p1 release --- Configure | 162 ++++++++++++++++++++++--------------------- config_h.SH | 2 +- confmagic.h | 4 +- game/txt/changes.txt | 3 + hdrs/externs.h | 2 +- hints/linux_2.sh | 12 ++++ src/attrib.c | 4 ++ src/notify.c | 13 ++-- 8 files changed, 111 insertions(+), 91 deletions(-) diff --git a/Configure b/Configure index a3caa25..99b5497 100644 --- a/Configure +++ b/Configure @@ -18,9 +18,9 @@ # you may fetch it yourself from your nearest archive site.) # -# $Id: Configure,v 1.1.1.1 2004-06-06 20:32:51 ari Exp $ +# $Id: Head.U 1.3 Mon, 10 Nov 2003 14:51:32 -0600 dunemush $ # -# Generated on Tue Sep 30 17:54:35 CDT 2003 [metaconfig 3.0 PL70] +# Generated on Mon Sep 11 02:11:00 EDT 2006 [metaconfig 3.0 PL70] cat >/tmp/c1$$ <grimble @@ -1190,7 +1189,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE. You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o -and contact the author (dunemush@pennmush.org). +and contact the author (devteam@cobramush.org). EOM echo $n "Continue? [n] $c" >&4 @@ -1244,7 +1243,7 @@ if $needman; then cat </dev/null 2>&1 && \ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then val="$define" - echo "You are using the GNU C Library" + echo "You are using the GNU C Library" >&4 +else +cat >gnulibc.c < +int main() +{ +#ifdef __GLIBC__ + return 0; +#else + return 1; +#endif +} +EOM +if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \ + ./gnulibc; then + val="$define" + echo "You are using the GNU C Library" >&4 else val="$undef" - echo "You are not using the GNU C Library" + echo "You are not using the GNU C Library" >&4 +fi fi $rm -f gnulibc* set d_gnulibc @@ -4646,9 +4666,13 @@ main() if (-1 == setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val))) exit(2); #ifdef I_NETINET_TCP +#ifdef TCP_KEEPIDLE val = 1; if (-1 == setsockopt(s, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val))) exit(3); +#else + exit(3); +#endif #endif exit(0); } @@ -4898,50 +4922,14 @@ $rm -f open3* : see if we should include -lssl and -lcrypto echo " " -if $test -r /usr/lib/libssl$_a || \ - $test -r /lib/libssl$_a || \ - $test -r /usr/local/lib/libssl$_a ; then - echo "-lssl found." >&4 - libssl='-lssl' -else - xxx=`./loc libssl$_a x $libpth` - case "$xxx" in - x) - echo "No ssl library found." >&4 - libssl='' - ;; - *) - echo "SSL library found in $xxx." >&4 - libssl="$xxx" - ;; - esac -fi - -if $test -r /usr/lib/libcrypto$_a || \ - $test -r /lib/libcrypto$_a || \ - $test -r /usr/local/lib/libcrypto$_a ; then - echo "-lcrypto found." >&4 - libcrypto='-lcrypto' -else - xxx=`./loc libcrypto$_a x $libpth` - case "$xxx" in - x) - echo "No crypto library found." >&4 - libcrypto='' - ;; - *) - echo "SSL crypto library found in $xxx." >&4 - libcrypto="$xxx" - ;; - esac -fi d_openssl="$undef" -case "x$libssl$libcrypto" in - x) - ;; - *) -$cat > test_openssl.c < test_ssl.c < #include #include @@ -4951,27 +4939,30 @@ int main(int argc, char **argv) { } EOM -if $cc $ccflags $ldflags -o test_openssl test_openssl.c $libs $libssl $libcrypto >/dev/null 2>&1 ; -then - echo 'You have openssl...' >&4 - version=`./test_openssl` - if $test $? -eq 0; then - d_openssl="$define" - echo '...and at least version 0.9.6. Great.' >&4 - else - echo '...but not at least version 0.9.6.' >&4 + if $cc $ccflags $ldflags -o test_ssl test_ssl.c $libs $libssl >/dev/null 2>&1 ; + then + echo 'You have openssl...' >&4 + version=`./test_ssl` + if $test $? -eq 0; then + echo '...and at least version 0.9.6. Great.' >&4 + d_openssl="$define" + else + echo '...but not version 0.9.6 or later.' >&4 + libssl='' + fi + else + echo "You don't seem to have openssl." >&4 libssl='' - libcrypto='' - fi + fi + $rm -f test_ssl* core + else - echo "You don't seem to have openssl." >&4 - libssl='' - libcrypto='' + + echo "Skipping openssl tests." >&4 + libssl='' + fi -$rm -f test_openssl* core - ;; -esac : see if rename exists set rename d_rename eval $inlibc @@ -6061,6 +6052,18 @@ esac case "$passcat" in '') passcat='cat /etc/passwd';; esac +case "$hostcat" in +'') hostcat='cat /etc/hosts';; +*) ;; +esac +case "$groupcat" in +'') groupcat='cat /etc/group';; +*) ;; +esac +case "$passcat" in +'') passcat='cat /etc/passwd';; +*) ;; +esac : now get the host name echo " " @@ -6790,10 +6793,10 @@ while test "$cont"; do done : offer to join the mailing list -list_request='pennmush-request@pennmush.org' -list_sub="subscribe" -list_unsub="unsubscribe" -list_name="pennmush" +list_request='' +list_sub="" +list_unsub="" +list_name="" $cat <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * that running config_h.SH again will wipe out any changes you've made. * For a more permanent change edit config.sh and rerun config_h.SH. * - * \$Id: config_h.SH,v 1.1.1.1 2004-06-06 20:32:51 ari Exp $ + * \$Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $ */ /* diff --git a/confmagic.h b/confmagic.h index 7672196..a408be1 100644 --- a/confmagic.h +++ b/confmagic.h @@ -6,7 +6,7 @@ * If you wish to get rid of this magic, remove this file and rerun metaconfig * without the -M option. * - * $Id: confmagic.h,v 1.1.1.1 2004-06-06 20:32:51 ari Exp $ + * $Id: Magic_h.U,v 3.0.1.2 1993/11/10 17:32:58 ram Exp $ */ #ifndef _confmagic_h_ @@ -80,7 +80,6 @@ #endif #endif -/* #ifndef HAS_SIGCHLD #define SIGCHLD SIGCLD #endif @@ -88,7 +87,6 @@ #ifndef HAS_SIGCLD #define SIGCLD SIGCHLD #endif -*/ #ifndef HAS_INDEX #ifndef index diff --git a/game/txt/changes.txt b/game/txt/changes.txt index 3206540..ddcf9b4 100644 --- a/game/txt/changes.txt +++ b/game/txt/changes.txt @@ -5,6 +5,9 @@ CobraMUSH Version 0.73 interest to the user. (See 'changes entries' for a list of all versions.) + Fixes: + * All fixes from 0.72 stable development series + & 0.72 CobraMUSH Version 0.72 This is a list of changes in CobraMUSH that could be of diff --git a/hdrs/externs.h b/hdrs/externs.h index 896ca6d..b5928ba 100644 --- a/hdrs/externs.h +++ b/hdrs/externs.h @@ -128,7 +128,7 @@ extern void sql_shutdown(void); #define NA_INTER_LOCK 0x10000 /**< Message subject to @lock/interact even if not otherwise marked */ #define NA_INTERACTION (NA_INTER_HEAR|NA_INTER_SEE|NA_INTER_PRESENCE|NA_INTER_LOCK) /**< Message follows interaction rules */ #define NA_SPOOF 0x8000 /**< @ns* message, overrides NOSPOOF */ -#define NA_EVALONCONTACT 0x10000 +#define NA_EVALONCONTACT 0x20000 /** A notify_anything lookup function type definition */ typedef dbref (*na_lookup) (dbref, void *); diff --git a/hints/linux_2.sh b/hints/linux_2.sh index 36b9674..ae6bc95 100644 --- a/hints/linux_2.sh +++ b/hints/linux_2.sh @@ -1,2 +1,14 @@ nm_opt='-B' + +# sometimes mysql might be found in an actual mysql +# subdirectory in the library path.. We'll need to +# check for that + +if [ -d /usr/lib/mysql ]; then + ldflags='-L/usr/lib/mysql' + elif [ -d /usr/local/lib/mysql ]; then + ldflags='-L/usr/local/lib/mysql' +fi + + echo "I suggest using sysmalloc when you edit options.h." diff --git a/src/attrib.c b/src/attrib.c index a9c06f8..191bc2f 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -148,6 +148,10 @@ int cannot_write_this_attr_internal(dbref player, ATTR *attr, dbref obj, char sa if(!controls(player, lock_owner) && AL_WLock(attr) != TRUE_BOOLEXP && !eval_boolexp(player, AL_WLock(attr), obj, NULL)) return 1; + /* As well if no lock is set.. and they don't controlt he player in the first place.. then they obviously can't.. */ + if(AL_WLock(attr) == TRUE_BOOLEXP && !controls(player, obj)) + return 1; + return 0; } /*======================================================================*/ diff --git a/src/notify.c b/src/notify.c index da9d6b2..68edd5e 100644 --- a/src/notify.c +++ b/src/notify.c @@ -823,14 +823,15 @@ notify_anything_loc(dbref speaker, na_lookup func, /* Evaluate the On Contact Message */ if(flags & NA_EVALONCONTACT) { + const char *tmpbuf = msgbuf; for (j = 0; j < 10; j++) wsave[j] = global_eval_context.wenv[j]; - global_eval_context.wenv[0] = msgbuf; - for (j = 1; j < 10; j++) - global_eval_context.wenv[j] = NULL; - bp = eocm; - process_expression(eocm, &bp, (const char **) &msgbuf, target, speaker, - speaker, PE_DEFAULT, PT_DEFAULT, NULL); + global_eval_context.wenv[0] = msgbuf; + for (j = 1; j < 10; j++) + global_eval_context.wenv[j] = NULL; + bp = eocm; + process_expression(eocm, &bp, &tmpbuf, target, speaker, speaker, + PE_DEFAULT, PT_DEFAULT, NULL); *bp = 0; for (j = 0; j < 10; j++) global_eval_context.wenv[j] = wsave[j]; -- 2.30.2