In file useracc.h:

int usr_insystem

(char* userid, int checkinvis,
struct shmuserrec** buf)

Check if a user is online (deprecated).

Documentation

Check if a user is online (deprecated).

Checks if the specified user is online, taking invisibility into account. If the user is online, the corresponding shared segment is attached and a pointer to it is returned.

Parameters:
- userid The canonical form of the user ID to operate on. You can use usr_exists() to render a user ID in its canonical form.
checkinvis - If non-zero and the user is online but invisible, the function will pretend the user is not online. If checkinvis is zero and the user is online, invisibility is not taken into account and the function will not `lie'.
buf - A pointer (passed by reference) to a user shared segment. If the call is successful and user `userid' is online, the corresponding shared memory segment will be attached to this process and a pointer to the segment will be written to buf.
Returns:
Zero if the user is not online; one if they are.
Deprecated:
Do not use this function. It is easy to misuse it. Please use the simpler usr_insys() function that does not suffer from the same problems. This function is for internal use only.
See Also:
usr_insys().

Alphabetic index



This page was generated with the help of DOC++.