AW_EVENT_WORLD_DISCONNECT

DESCRIPTION

Event called when the world connection is lost.

NOTES

This event indicates that the connection to the world server has been severed.  No further world methods will work until another world is entered via aw_enter.   The attribute AW_DISCONNECT_REASON contains a reason code indicating the reason for the disconnect.  Possible values for AW_DISCONNECT_REASON include:

RC_EJECTED
RC_CONNECTION_LOST
RC_NOT_WELCOME

EXAMPLE

void handle_world_disconnect (void)
{

  int rc;

  rc = aw_int (AW_DISCONNECT_REASON);
  switch (rc) {
    case RC_EJECTED:
      printf ("I've been ejected!\n");
      break;
    case RC_CONNECTION_LOST:
      printf ("I've lost my connection to the world.\n");
      break;
    case RC_NOT_WELCOME:
      printf ("I'm not allowed in this world.\n");
      break;
    default:
      printf ("Connection to world lost (reason %d)\n", rc);
      break;
  }

}

aw_event_set (AW_EVENT_WORLD_DISCONNECT, handle_world_disconnect);