From 3ab79612e300ec1670c7f6bf950a2ebe1e3088be Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Wed, 21 Feb 2007 00:32:40 +0000 Subject: [PATCH] @attribute/access now handles "none" privilege --- game/txt/hlp/cobra_cmd.hlp | 7 ++++--- src/atr_tab.c | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/game/txt/hlp/cobra_cmd.hlp b/game/txt/hlp/cobra_cmd.hlp index b2da387..0867a22 100644 --- a/game/txt/hlp/cobra_cmd.hlp +++ b/game/txt/hlp/cobra_cmd.hlp @@ -375,7 +375,7 @@ See also: @atrchown, ATTRIBUTES, NON-STANDARD ATTRIBUTES, LOCKING See also: @success, @osuccess, get, @lock, EXITS, ACTION LISTS & @attribute @attribute - @attribute/access[/retroactive] = + @attribute/access[/retroactive] = @attribute/delete @attribute/rename = @@ -393,8 +393,9 @@ See also: @success, @osuccess, get, @lock, EXITS, ACTION LISTS @attribute/access adds a new standard attribute into the table, associating it with the given space-separated list of flags. - See 'help @set' for possible flags. - If the /retroactive switch is added, the flags are set on every copy + See 'help @set' for possible flags. A flag list of "none" removes + all flag associations. + If the /retroactive switch is added, the flags are assigned to every copy of the attribute that already exists in the database. @attribute/delete removes a standard attribute from the table. diff --git a/src/atr_tab.c b/src/atr_tab.c index c74dedc..c582d78 100644 --- a/src/atr_tab.c +++ b/src/atr_tab.c @@ -265,10 +265,12 @@ do_attribute_access(dbref player, char *name, char *perms, int retroactive) notify(player, T("Which attribute do you mean?")); return; } - flags = string_to_privs(attr_privs, perms, 0); - if (!flags) { - notify(player, T("I don't understand those permissions.")); - return; + if (strcasecmp(perms, "none")) { + flags = string_to_privs(attr_privs, perms, 0); + if (!flags) { + notify(player, T("I don't understand those permissions.")); + return; + } } upcasestr(name); /* Is this attribute already in the table? */ -- 2.30.2