Method code for $sys.parse_valid_genders()

[Turn off line numbering]
  1: arg value, action, @args;
  2: var obj, kids, i;
  3: 
  4: if (!(| (obj = $object_lib.to_dbref("gender_" + value)) |))
  5:     (> (obj = $object_lib.to_dbref(value)) <);
  6: if (action == 'del) {
  7:     if (!(obj in .get_valid_genders()))
  8:         throw(~set, "The object '" + value + "' is not set, and thus cannot be removed");
  9:     return obj;
 10: }
 11: if (!(obj in $gender.children()))
 12:     throw(~set, "The object '" + value + "' is not a child of $gender");
 13: return obj;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon