User online structure.
User online structure.This is a temporary record of user details that change a lot while the user is online. Most of the fields are derived from the user's account record. The rest are filled in by the system while the user is online. Unlike useracc_t, this record is not saved to disk.
- userid
- The user's handle in the system. Mainly used for sanity checks, since including the user ID here is redundant.
- channel
- The field name is slightly misleading: it contains the device name (minus the "/dev/" the user's channel is using.
- emupty
- This is the device name (minus the "/dev/") where processes servicing the user are running. This is not the same as channel because of emud, the emulation/translation daemon, which sits on the device denoted by channel and creates a new, pseudo-tty emupty for the processes to run on.
- baudrate
- The user's bps rate (baud is such a misnomer), as returned by bbsgetty. This may be a real bps value if the number is positive, or a special, non-positive (i.e less than one) value denoting special connections. For instance, telnet connections don't have an easily measurable bps rate, so they're denoted as such.
- curpage, prevpage
- The user's current and previous pages in the menu structure of the BBS. Used by the Menu Manager meta-module.
- flags
- A set of flags defining per-session, volatile user preferences and state. This field is formed by ORring together zero or more of the OLF_x flags.
- input
- User's remaining input before entering a module. Menu Manager fills this in before running a module with concatenated commands still to be processed. It is the module's responsibility to process those as soon as it starts.
- descr
- The user's current position in the BBS described in all available languages (if available). Again, this is filled in by the Menu Manager and is the description of the user's current page, curpage.
- pagestate, lastpage
- The page state restricts paging to the user in a small range of ways, listed as the PGS_x constants. The lastpage field gives the time of the last successful page to the user. It's used internally to enforce the paging restrictions.
- tick, fraccharge
- Used internally by the BBS daemon (bbsd) to charge fraction-credits.
- credspermin
- The credit consumption rate for this user (this varies with the user's location in the system). The unit is credits per 100 minutes. That is, for a typical 1 credit per minute, you need to specify 100 for this field. A value of 250 gives a credit consumption rate of 2.5 credits per minute.
- onlinetime
- The time (in minutes) the user has spent on this connection.
- timeoutticks, idlezap
- The inactivity counter and inactivity timeout setting. Used internally. The two fields do not have the same units. The former is in bbsd ticks (fractions of a minute), the latter in minutes.
- statptrs, statcreds
- Used by statd, the statistics daemon.
- loggedin
- Time the user logged in. Used to keep track of the user's recent connections.
- telechan, telecountdown
- State used for the Teleconference module. The former field stores the last channel accessed by the user; the latter keeps track of the number of times the user is allowed to talk in the Teleconference module (this is an optional restriction on non-paid users).
- lastlib
- State used by the Files module. Denotes the last file library (directory) visited by the user.
- injothqueue
- System V IPC message queue ID used to page messages to this user.
- lastconsolepage
- The time of the user's last page to the system console.
- magic
- A magic number used to avoid data corruption. Set to ONL_MAGIC.