Aw login
Minimum requirements | ||
---|---|---|
Added in version 2.1 | ||
SDK | build 13 |
int aw_login (void)
Description
Logs in to the universe with a given identity.
Callback
Arguments
None
Argument attributes
- AW_LOGIN_NAME
- Bots can use any name they want as long as it is valid. The same rules apply to both bot and citizen names.
- AW_LOGIN_OWNER
- Citizen number of the bot's owner.
- AW_LOGIN_PRIVILEGE_PASSWORD
- Privilege password of the bot's owner. This is NOT the same as the owner's login password!
- AW_LOGIN_APPLICATION
- Must be set to indicate the name of an application, author, product and version. i.e. "XelaG X1 Build 1417"
Return values
- RC_SUCCESS (1) (2)
- RC_NOT_INITIALIZED (1)
- RC_NO_INSTANCE (1)
- RC_NO_CONNECTION (1)
- The connection to the universe is down.
- RC_EJECTED (2)
- RC_BOT_LIMIT_EXCEEDED (2)
- It would exceed the maximum number of bots that can be run simultaneously by the owner.
- RC_NO_SUCH_CITIZEN (2)
- AW_LOGIN_OWNER did not match the number of a citizen.
- RC_INVALID_PASSWORD (2)
- AW_LOGIN_PRIVILEGE_PASSWORD did not match the privilege password of the citizen specified by AW_LOGIN_OWNER.
- RC_CITIZEN_DISABLED (2)
- RC_BOT_LIMIT_EXCEEDED (2)
- RC_NAME_TOO_SHORT (2)
- RC_NAME_TOO_LONG (2)
- RC_NAME_CONTAINS_NONALPHANUMERIC_CHAR (2)
- RC_NO_SUCH_CITIZEN (2)
- Name ended with a " (double-quote).
- RC_NAME_ENDS_WITH_BLANK (2)
- RC_NAME_CONTAINS_INVALID_BLANK (2)
- RC_CITIZENSHIP_EXPIRED (2)
- RC_MUST_UPGRADE (2)
If AW_LOGIN_APPLICATION was set to "Invite":
- RC_SUCCESS (1) (2)
- RC_NOT_INITIALIZED (1)
- RC_NO_INSTANCE (1)
- RC_NO_CONNECTION (1)
- The connection to the universe is down.
- RC_EJECTED (2)
- RC_NO_SUCH_CITIZEN (2)
- AW_LOGIN_NAME did not match the name of a citizen.
- RC_INVALID_PASSWORD (2)
- AW_LOGIN_PASSWORD did not match the password of the citizen specified by AW_LOGIN_NAME.
- RC_CITIZEN_DISABLED (2)
- RC_CITIZENSHIP_EXPIRED (2)
(1) Possible return values when a callback is installed.
(2) Returned by the universe server.
Returned attributes
- AW_CITIZEN_BETA
- AW_CITIZEN_CAV_ENABLED
- AW_CITIZEN_NAME
- AW_CITIZEN_NUMBER
- AW_CITIZEN_PAV_ENABLED
- AW_CITIZEN_TIME_LEFT
- AW_LOGIN_PRIVILEGE_NAME
Usage
Create a new bot instance owned by citizen Bob.
#define BOBS_CITIZEN_NUMBER 556306 int rc; aw_string_set (AW_LOGIN_NAME, "Bob bot"); aw_int_set (AW_LOGIN_OWNER, BOBS_CITIZEN_NUMBER); aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, "Bobsprivpass"); aw_string_set (AW_LOGIN_APPLICATION, "Bob cool bot program"); rc = aw_login (); if (rc != RC_SUCCESS) printf ("Unable to login (reason %d)\n", rc);
Notes
INVITE
For one time during the 3.4 beta, this function was used in conjunction with AW_LOGIN_PASSWORD and AW_LOGIN_APPLICATION to allow an "invite" type application. Such applications allowed the SDK to be used with a citizen's password instead of their privilege password. This was achievable by setting AW_LOGIN_APPLICATION to "INVITE".
Since then, it has been disabled for security reasons and undertaking the above step will yield no result.