Logs in to the universe with a given identity.
AW_CALLBACK_LOGIN
Bots can use any name they want, but must operate under the privileges of an existing citizen. The following attributes must be set before a successful login:
AW_LOGIN_NAME: The name of the bot (can be any string from 2
to 16 characters in length)
AW_LOGIN_OWNER: The citizen number of the bot's
owner
AW_LOGIN_PRIVILEGE_PASSWORD: The
privilege password of the bot's owner. Note: this is NOT
the same as the owner's login password!
The optional attribute AW_LOGIN_APPLICATION can also be set to indicate the name of your application.
Note that there is a limit to the number of bots that can be run simultaneously by any one citizen. If this limit is reached, further calls to aw_login will fail and return RC_BOT_LIMIT_EXCEEDED.
/* create a new bot instance owned by citizen Bob */
#define BOBS_CITIZEN_NUMBER 556306
int rc;
aw_string_set (AW_LOGIN_NAME, "Bob's 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's cool bot program");
if (rc = aw_login ())
printf ("Unable to login (reason %d)\n", rc);