From: Ari Johnson Date: Thu, 14 Feb 2008 15:14:37 +0000 (+0000) Subject: Fixed attribute read locks X-Git-Tag: 0.72p4~5 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=4e1e7993cc5f0578de596c73fced9ba5d9a092a8;p=cobramush.git Fixed attribute read locks (cherry picked from commit 84cd46099561db6299438a5da32994fcdfd7fc26) --- diff --git a/game/txt/changes/0.72p4 b/game/txt/changes/0.72p4 index 07b80c6..f8c1a38 100644 --- a/game/txt/changes/0.72p4 +++ b/game/txt/changes/0.72p4 @@ -28,4 +28,5 @@ CobraMUSH Version 0.72p4 * Fixed possible crash in process_commands() [AEJ] * Fixed possible crash in trim_space_sep() [AEJ] * Fixed attribute flag mortal_dark [AEJ] + * Fixed attribute read locks [AEJ] diff --git a/src/attrib.c b/src/attrib.c index 636a09f..31087d1 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -2040,10 +2040,6 @@ can_read_attr_internal(dbref player, dbref obj, ATTR * atr) visible = (player == NOTHING); - /* Do an easy yes.. If they can write, it they can read it */ - if (Can_Write_Attr(player, obj, atr)) - return 1; - /* Evaluate read lock first here */ if (AL_RLock(atr) == TRUE_BOOLEXP) r_lock = 1; @@ -2067,21 +2063,15 @@ can_read_attr_internal(dbref player, dbref obj, ATTR * atr) /* Take an easy out if there is one... */ /* If we can't see the attribute itself, then that's easy. */ - if (AF_Internal(atr) || (!Admin(player) && (AF_Mdark(atr) || - !(cansee - || - ((AF_Visual(atr) - || - ((AL_RLock(atr) != - TRUE_BOOLEXP) - && r_lock)) - && (!AF_Nearby(atr) - || canlook)) - || (!visible - && !Mistrust(player) - && - (Owner(AL_CREATOR(atr)) - == Owner(player))))))) + if (AF_Internal(atr) + || (!Admin(player) + && (AF_Mdark(atr) + || !(cansee + || ((AF_Visual(atr) + || ((AL_RLock(atr) != TRUE_BOOLEXP) && r_lock)) + && (!AF_Nearby(atr) || canlook)) + || (!visible && !Mistrust(player) + && (Owner(AL_CREATOR(atr)) == Owner(player))))))) return 0; /* If the attribute isn't on a branch, then that's also easy. */