Blocks all access to the world from a specific IP address, computer, or citizen number
AW_CALLBACK_WORLD_EJECTION_RESULT
The world ejection mechanism has been extended in Active Worlds 3.3 to support ejections by computer ID or by citizen number, as well as by IP address. Access to these extensions require build 24 or later of the SDK, and version 3.3 or later of the world server.
Only instances owned by the world caretaker may use aw_world_ejection_add.
The attribute AW_EJECTION_TYPE specifies the type of the ejection and the format of AW_EJECTION_ADDRESS:
| AW_EJECT_BY_ADDRESS | Ejection is by IP address |
| AW_EJECT_BY_COMPUTER | Ejection is by computer ID |
| AW_EJECT_BY_CITIZEN | Ejection is by citizen number |
If AW_EJECTION_TYPE is AW_EJECT_BY_ADDRESS, AW_EJECTION_ADDRESS specifies the IP address to be blocked (in network byte order.) If the least significant byte of the address is zero, the entire class C IP address is blocked.
If AW_EJECTION_TYPE is AW_EJECT_BY_COMPUTER, AW_EJECTION_ADDRESS specifies the 32-bit ID of the computer to be blocked. However, there is currently no mechanism for directly querying the ID of a user's computer from the SDK. Ejections by computer ID are added automatically by the world server whenever a user is ejected via aw_world_eject and their computer has an ID available. Once the ejection is in place, the computer ID can be determined by scanning the ejection database using either aw_world_ejection_next or aw_world_ejection_previous.
If AW_EJECTION_TYPE is AW_EJECT_BY_CITIZEN, AW_EJECTION_ADDRESS specifies the citizen number of the user to block. Ejections of this type will only block the user as long as they continue to use the account that has been blocked.
The attribute AW_EJECTION_EXPIRATION_TIME specifies when the ejection will expire. If AW_EJECTION_EXPIRATION_TIME is set to zero, the ejection never expires.
The string attribute AW_EJECTION_COMMENT can contain an optional text comment to associate with the ejection record.
/* block a class C address from accessing the world for one week */
aw_int_set (AW_EJECTION_TYPE, AW_EJECT_BY_ADDRESS);
aw_int_set (AW_EJECTION_ADDRESS, inet_addr ("241.197.54.0"));
aw_int_set (AW_EJECTION_EXPIRATION_TIME, time (NULL) + 7 * 24 * 60 * 60);
aw_string_set (AW_EJECTION_COMMENT, "This person was very naughty!");
if (aw_world_ejection_add ())
printf ("Unable to add ejection\n");
aw_world_ejection_delete
aw_world_ejection_lookup
aw_world_ejection_next
aw_world_ejection_previous