Aw world ejection delete

From ActiveWiki
Jump to navigation Jump to search


Minimum requirements
Added in version 3.0
SDKbuild 16


int aw_world_ejection_delete (void)

Description

Removes an ejection from the world.

Callback

AW_CALLBACK_WORLD_EJECTION_RESULT

Notes

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.

For version 3.3 and later: The ejection to be deleted is now specified by the AW_EJECTION_TYPE and AW_EJECTION_ADDRESS attributes, and not via a function argument.

Arguments

None

Argument attributes

AW_EJECTION_TYPE (1)
AW_EJECTION_ADDRESS (1)

(1) Specifies the ejection to be queried. See aw_world_ejection_add for more information.

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)

(1) Possible return values when a callback is installed.

(2) Returned by the world server.

Usage

Unblock a class C IP address from the world.

int rc;

aw_int_set (AW_EJECTION_TYPE, AW_EJECT_BY_ADDRESS);
aw_int_set (AW_EJECTION_ADDRESS, inet_addr ("241.197.54.0"));

rc = (aw_world_ejection_delete ();
if (rc != RC_SUCCESS)
  printf ("Unable to delete ejection (reason %d)\n", rc);
else
  printf ("Ejection successfully deleted\n");

See also