int aw_license_add (void)

DESCRIPTION

Creates a new world license.

CALLBACK

AW_CALLBACK_LICENSE_RESULT

NOTES

Only instances owned by the root account (citizen #1) may use aw_license_add.

The following attributes are used in the creation of the license:

AW_LICENSE_NAME Name of the world; no more than 8 characters
AW_LICENSE_PASSWORD World password;  no more than 8 characters
AW_LICENSE_USERS Maximum  simultaneous users
AW_LICENSE_RANGE Maximum building range (in cells from 0N 0W)
AW_LICENSE_EMAIL Email address of world owner (optional)
AW_LICENSE_COMMENT Additional text information (optional)
AW_LICENSE_EXPIRATION_TIME Expiration date of  license (0 = no expiration)
AW_LICENSE_HIDDEN Whether or not world is shown in the world list
AW_LICENSE_ALLOW_TOURISTS Whether or not toursts are allowed to access the world

EXAMPLE

/* create a new license for the world "aw" */

int		rc;

aw_string_set (AW_LICENSE_NAME, "aw");
aw_string_set (AW_LICENSE_PASSWORD, "secret");
aw_int_set (AW_LICENSE_USERS, 50);
aw_int_set (AW_LICENSE_RANGE, 10);
aw_string_set (AW_LICENSE_EMAIL, "aw@activeworlds.com");
aw_string_set (AW_LICENSE_COMMENT, "This is the AW home world");
aw_int_set (AW_LICENSE_EXPIRATION_TIME, 0);
aw_bool_set (AW_LICENSE_HIDDEN, FALSE);
aw_bool_set (AW_LICENSE_ALLOW_TOURISTS, TRUE);
if (rc = aw_license_add ())
  printf ("Unable to add license (reason %d)\n", rc);
else
  puts ("License added");

SEE ALSO

aw_license_attributes
aw_license_change
aw_license_delete
aw_license_next
aw_license_previous