Name()

From TinyMUX
Jump to navigation Jump to search

FUNCTION: name

  • TinyMUX: name(object)
  • PennMUSH: name(object)
  • PennMUSH: name(object, new name)
  • PennMUSH: name(player, new name password) broken
  • PennMUSH: name() deprecated

Return the name of object, or (in PennMUSH only), change the name of an object.

Arguments

object
An object designator, typically a dbref.
player
A player designator, typically a dbref.
new name
The new name to assign to the object.
password
The password of the player. See notes

Returns

The single-argument versions return the name of the object on success.

PennMUSH's deprecated zero-argument version returns the empty string.

PennMUSH returns nothing for the two-argument version.

Errors

PennMUSH

#-1 NO SUCH OBJECT VISIBLE
When object cannot be found.

TinyMUX

#-1 NOT FOUND
When object cannot be found.

Notifications

PennMUSH

I can't see that here
object is not found.
Name set.
object's name changed to new name.
You can't give a player that name.
new name is already the name or alias of an existing player, or the name is disallowed in names.cnf.
Permission denied.
The enactor doesn't control object.

Notes

The argument is optional in PennMUSH, but this behaviour is deprecated. Do not rely upon it.

PennMUSH claims to require a password for renaming players, but it does not. If you control the object being renamed, the password is ignored. (If you don't control it, you can't do it anyway.)

In PennMUSH, if object is already called new name, the operation is successful. If object has new name as an alias, the operation is successful.

Availability

Known to be available on:

See Also

Commands

Functions

Attributes