From: Ari Johnson Date: Thu, 14 Feb 2008 15:14:37 +0000 (+0000) Subject: Fixed attribute read locks X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=540c8977e4ea21001180cec504ed69690dd8ce98;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 d4e15e1..7958479 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -2098,10 +2098,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; @@ -2125,21 +2121,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. */