Aw world ejection next
Minimum requirements | ||
---|---|---|
Added in version 3.0 | ||
SDK | build 16 |
int aw_world_ejection_next (void)
Description
Queries information about the next ejection in the world ejection database.
Callback
Notes
The attributes AW_EJECTION_TYPE and AW_EJECTION_ADDRESS specify the previous ejection. See aw_world_ejection_add for a complete description of these attributes and how to use them.
To scan the entire ejection database, set AW_EJECTION_TYPE to AW_EJECT_BY_ADDRESS and AW_EJECTION_ADDRESS to 0 and call aw_world_ejection_next repeatedly until it fails.
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 IP addresses currently blocked from entering the world.
aw_int_set (AW_EJECTION_TYPE, AW_EJECT_BY_ADDRESS); aw_int_set (AW_EJECTION_ADDRESS, 0); while (aw_world_ejection_next () == 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)); }