Description
Checks if a user is online.
Callback
BONE_CALLBACK_ISONLINE
Notes
The function parameters are the BONEHANDLE and the username.
Example
bone_setcallback(BONE_CALLBACK_ISONLINE, callback_isonline);
BONEHANDLE bnd;
//create and login BONEHANDLE here
if (bone_isonline(bnd, "ima"))
printf("Unable to query online status (reason %d).\n",
bone_getlasterror());
void callback_isonline(BONEHANDLE bnd, const char *name, int onlinestatus)
{
switch(onlinestatus)
{
case BONE_API_ISONLINE_NOSUCHUSER: printf("%s is an invalid username.\n",name);
break;
case BONE_API_ISONLINE_USERPRESENT: printf("%s is online!\n",name);
break;
case BONE_API_ISONLINE_NOTPRESENT: printf("%s is offline.\n",name);
break;
case BONE_API_ISONLINE_ADMINPRESENT: printf("Administrator %s is online.\n",name);
break;
}
}