@verb #12:"set_aliases _set_aliases" this none this rxdo #55 @program #12:"set_aliases _set_aliases" this none this "set_aliases(alias_list)" "For changing player aliases, we check to make sure that none of the aliases match existing player names/aliases. Aliases containing spaces are not entered in the $player_db and so are not subject to this restriction ($string_utils:match_player will not match on them, however, so they only match if used in the immediate room, e.g., with match_object() or somesuch)." "Also we make sure that the .name is included in the .alias list. In any situation where .name and .aliases are both being changed, do the name change first." " => E_PERM if you don't own this" " => E_NACC if the player database is not taking new aliases right now." " => E_TYPE if alias_list is not a list" " => E_QUOTA if alias_list is stupidly long" " => E_INVARG if any element of alias_list is not a string" if (!$perm_utils:controls(caller_perms(), this) && !(this == caller)) raise(E_PERM) elseif (!is_player(this)) "we don't worry about the names of player classes." return pass(@args) "This used to be 'raise(pass(@args))', if you see need to change it back, do so. - Lao (900602760) " elseif ($player_db.frozen) raise(E_NACC) elseif (typeof(aliases = args[1]) != $LIST) raise(E_TYPE) elseif (!caller_perms().wizard && length(aliases) > $max_num_aliases && length(aliases) > length(this.aliases)) raise(E_QUOTA) "Only those with Multiple Personality Disorder need more than 'n' aliases!" else r = {} for a in (aliases) typeof(a) == $STR || raise(E_INVARG) if (index(a, " ") || !($player_db:available(a) in {this, 1}) || (length(a) <= 1 && a != this.name)) r = setadd(r, tostr(a, " is not an available alias, ", $player_db:why_not_available(a))) aliases = setremove(aliases, a) endif endfor aliases = setadd(aliases, this.name) old = this.aliases this.aliases = aliases for a in (old) if (!(a in aliases)) $player_db:delete2(a, this) endif endfor for a in (aliases) if (!index(a, " ")) $player_db:insert(a, this) endif endfor return r || 1 endif "Last modified by Dax (#789) on Wed May 4 06:45:59 2005 MDT." .