Aw world ejection previous
Jump to navigation
Jump to search
Minimum requirements | ||
---|---|---|
Added in version 3.0 | ||
SDK | build 16 |
int aw_world_ejection_previous (void)
Description
Queries information about the previous ejection in the world ejection database.
Callback
Notes
The attributes AW_EJECTION_TYPE and AW_EJECTION_ADDRESS specify the ejection from which to scan backwards through the database. See aw_world_ejection_add for a complete description of these attributes and how to use them.
Only world server administration instances or those owned by a caretaker (i.e. aw_bool (AW_WORLD_CARETAKER_CAPABILITY) returns 1) may use this method.
Arguments
None
Argument attributes
Return values
- RC_SUCCESS (1) (2)
- RC_NOT_INITIALIZED (1)
- RC_NO_INSTANCE (1)
- RC_NO_CONNECTION (1)
- The connection to the world is down.
- RC_DATABASE_ERROR (2)
- RC_NO_SUCH_EJECTION (2)
(1) Possible return values when a callback is installed.
(2) Returned by the world server.
Returned attributes
- AW_EJECTION_TYPE
- AW_EJECTION_ADDRESS
- AW_EJECTION_CREATION_TIME
- AW_EJECTION_EXPIRATION_TIME
- AW_EJECTION_COMMENT
Usage
List all addresses currently blocked from entering the world, in reverse order.
aw_int_set (AW_EJECTION_TYPE, AW_EJECT_BY_ADDRESS); aw_int_set (AW_EJECTION_ADDRESS, 0xffffffff); while (aw_world_ejection_previous () == RC_SUCCESS) { int address; address = aw_int (AW_EJECTION_ADDRESS); if (aw_int (AW_EJECTION_TYPE) == AW_EJECT_BY_ADDRESS) printf ("%-15s %d\n", inet_ntoa (*(struct in_addr*) &address), aw_int (AW_EJECTION_EXPIRATION_TIME)); }